Laravel redirects post to localhost
<p>I am using Laravel 5 and started the quickstart from the Laravel website.
If i used the post function that is in the code it redirects to localhost/LOCATION
instead of localhost/PROJECT/public/LOCATION.</p>

<p>It might be something in my config but i can't figure out what it is.</p>

<p>here is the code from my router it appears to be a problem in the post task function.</p>

<pre><code>&lt;?php

use App\Task;
use Illuminate\Http\Request;

Route::group(['middleware' =&gt; ['web']], function () {
    /**
     * Show Task Dashboard
     */
    Route::get('/', function () {
        return view('tasks', [
            'tasks' =&gt; Task::orderBy('created_at', 'asc')-&gt;get()
        ]);
    });

    /**
     * Add New Task
     */
    Route::post('/task', function (Request $request) {
        $validator = Validator::make($request-&gt;all(), [
            'name' =&gt; 'required|max:255',
        ]);

        if ($validator-&gt;fails()) {
            return redirect('/')
                -&gt;withInput()
                -&gt;withErrors($validator);
        }

        $task = new Task;
        $task-&gt;name = $request-&gt;name;
        $task-&gt;save();

        return redirect('/');
    });

    /**
     * Delete Task
     */
    Route::delete('/task/{id}', function ($id) {
        Task::findOrFail($id)-&gt;delete();

        return redirect('/');
    });
});
</code></pre>

<p>With this code I post to the route </p>

<pre><code>&lt;form action="/task" method="POST" class="form-horizontal"&gt;
    {{ csrf_field() }}

    &lt;!-- Task Name --&gt;
    &lt;div class="form-group"&gt;
        &lt;label for="task-name" class="col-sm-3 control-label"&gt;Task&lt;/label&gt;

        &lt;div class="col-sm-6"&gt;
            &lt;input type="text" name="name" id="task-name" class="form-control" value="{{ old('task') }}"&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;!-- Add Task Button --&gt;
    &lt;div class="form-group"&gt;
        &lt;div class="col-sm-offset-3 col-sm-6"&gt;
            &lt;button type="submit" class="btn btn-default"&gt;
                &lt;i class="fa fa-btn fa-plus"&gt;&lt;/i&gt;Add Task
            &lt;/button&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>UPDATE
If I change my form action to "/quickstart/public/task" it works but /task should redirect to it automatically in laravel if i remember correctly </p>