vendredi 13 octobre 2017

Strange view error on Laravel

I have some cotroller like this:

Route::get('/article/create', 'ArticlesController@create');

and here's my ArticlesController@create:

public function create(){
        return view('articles.create',
            [
                'title'=>'Tambah Artikel',
                'username'=>'Eko Budiyanto',
                'status' => 'Offline'
            ]
        );
    }

when i trying to access http://ift.tt/1LPWxy6 i got this strange errors:

"Trying to get property of non-object (View: E:\xampp\htdocs\blog\resources\views\articles\single.blade.php)"

how come i can get this kind of error when my view is pointing at articles.create but the error is at single.blade.php which it suppose for ArticlesController@view?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire