jeudi 18 janvier 2018

Laravel error: route not defined

Possible duplicate of this. But unable to get the answer in my case.

I need to use a link on my Laravel website, but it keeps resulting in "route not defined" error.

Html:

<ul class="nav navbar-nav">
@auth
    <li>
        <a href="">Add post</a>
    </li>
@endauth
</ul>

web.php:

Route::get('/add-post', 'PagesController@add_post');

PagesController:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class PagesController extends Controller
{
    public function add_post()
    {
        return view('add-post');
    }
}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2mKhodF
via IFTTT

Aucun commentaire:

Enregistrer un commentaire