Back

Laravel 5 error link_to_route


frocco posted 4 years ago

Hello,

Just downloaded Laravel 5 and am getting Call to undefined function link_to_route()

Am I supposed to declare this somewhere?

Thanks

frocco replied 4 years ago

Laravel 5 documentation shows the link_to_route, but I still am getting an error when using it.

manujas replied 4 years ago

please paste some code. And what error?

I am using link_to_route without problems.

usm4n replied 4 years ago

Hi, to use the link_to_route helper you need to pull the "illuminate/html": "~5.0" package. Instructions are available here: http://laravel.com/docs/5.0/upgrade#upgrade-5.0 see the Form & Html Helpers section.

Usman.

frocco replied 4 years ago Solution

usm4n said:

Hi, to use the link_to_route helper you need to pull the "illuminate/html": "~5.0" package. Instructions are available here: http://laravel.com/docs/5.0/upgrade#upgrade-5.0 see the Form & Html Helpers section.

Usman.

Thank you

dreamingInCode replied 4 years ago

Just a heads up. Laravel is no longer maintaining those packages. They're now handled by Laravel Collective Here is the github

ColBatGuano replied 4 years ago

Hi, I've just tried to follow the instructions for using these, but can't get it to work.

The instructions say to add...

'Collective\Html\HtmlServiceProvider',

to the providers array in config/app.php, yet every other entry in there is of the form...

Collective\Html\HtmlServiceProvider::class

Apart from resolving this issue is there anything else you need to do to enable this?

thanks,


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us