Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Class 'App\Http\Controllers\Url' not found' -- Laravel 5 [closed]

I have started learning Laravel 5. Following this tutorial. I am getting this error. (Class 'App\Http\Controllers\Url' not found).
I have attached the image of my code here.

code-laravel



Whoops, looks like something went wrong.

1/1
FatalErrorException in UrlController.php line 22:
Class 'App\Http\Controllers\Url' not found
in UrlController.php line 22
at FatalErrorException->__construct() in compiled.php line 1838
at HandleExceptions->fatalExceptionFromError() in compiled.php line 1833
at HandleExceptions->handleShutdown() in compiled.php line 0
at UrlController->store() in compiled.php line 8504
at call_user_func_array:{C:\wamp\www\readit-later\vendor\compiled.php:8504}() in compiled.php line 8504
at Controller->callAction() in compiled.php line 8572
at ControllerDispatcher->call() in compiled.php line 8551
at ControllerDispatcher->Illuminate\Routing\{closure}() in compiled.php line 9190



help me out.

like image 239
Sariban D'Cl Avatar asked Jan 18 '26 06:01

Sariban D'Cl


1 Answers

In the controller add

use URL;
like image 189
RJH Avatar answered Jan 19 '26 18:01

RJH



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!