Laravel authentication

Username (e.g. epiz_XXX) or Website URL

http://lindacom.infinityfreeapp.com/laravel/public/

Error Message

Please install the laravel/ui package in order to use the Auth::routes() method.

Other Information

I have installed Laravel into my website and I am following a tutorial. The tutorial says that there should be some files in the views > auth folder (login, register, verify etc) but the install does not include these which is no problem as I can create them myself. I have tried to enter Auth:: routes(); in the web.php file to add authentication to the site howver I get the above message. How can I install the ui package on this hosted site?

You need to use Composer to install the package. If you have Composer installed on your own computer, you can run the command compose require laravel/ui from the root directory of your project, and the upload the vendor folder (and maybe also the bootstrap folder) from your computer to your account.

3 Likes

Thank you. Which folder do I upload the files to in my account? I did an internet search but I can’t find the answer.

You upload the files to the same place where you uploaded the files in the first place.

1 Like

Thanks I understand now. I replaced the composer.json file in the laravel > vendor > laravel > framework folder. I replaced the packages and the services files in the laravel > bootstrap > cache folder. I’m now getting the error Class ‘Laravel\Ui\UiServiceProvider’ not found.

The error was thrown by this file vendor/laravel/framework/src/Illuminate/Foundation/Application.php:690

I have run the php artisan ui vue command as well to get the rest of the files and have uploaded them but still get an error related to class not found

I part fixed the error by editing the vendor > composer > autoload static file but it seems there are still dependencies missing. Are you able to update composer at your end?

Please upload the FULL vendor folder again and overwrite any modified files. Composer has some additional files in order to know which classes are available, and uploading the PHP classes without that extra metadata is not going to work.

We don’t have any Composer on our end. You have Composer on your computer to install the dependencies, and Composer in your website code to load the classes. All we provide is a PHP interpreter and a web server and and your website code should do the rest.

4 Likes

I have deleted the vendor folder and uploaded the whole of the new vendor folder (I had already overwritten modified files). My site is now giving a 500 error so I am unable to see what the issue is. Do you know?

Thank you. I turned errors on and found that I had one folder left to upload. All sorted now. Many thanks for your help.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.