php - 'Class 'App\Http\Controllers\Url' not found' -- Laravel 5 -
i have started learning laravel 5. following this tutorial. getting error. (class 'app\http\controllers\url' not found
).
have attached image of code here.
whoops, looks went wrong. 1/1 fatalerrorexception in urlcontroller.php line 22: class 'app\http\controllers\url' not found in urlcontroller.php line 22 @ fatalerrorexception->__construct() in compiled.php line 1838 @ handleexceptions->fatalexceptionfromerror() in compiled.php line 1833 @ handleexceptions->handleshutdown() in compiled.php line 0 @ urlcontroller->store() in compiled.php line 8504 @ call_user_func_array:{c:\wamp\www\readit-later\vendor\compiled.php:8504}() in compiled.php line 8504 @ controller->callaction() in compiled.php line 8572 @ controllerdispatcher->call() in compiled.php line 8551 @ controllerdispatcher->illuminate\routing\{closure}() in compiled.php line 9190
me out.
you should create model name url or whatever suits best inside app folder may generate url model artisan command
php artisan make:model url
or can create 1 manually e.g
<?php namespace app; use illuminate\database\eloquent\model; use illuminate\database\query\builder; protected $table = 'table_name' // in case table name different plural of model name class url extends model { }
and in controller use url model e.g
use app\url;
and able use
$url = new url; $url->url = request::get('url'); //make sure have used use illuminate\http\request; in starting of controller
Comments
Post a Comment