Class not found despite composer dump autoload - laravel

Good day,
I am getting a class not found error on our website.
Class 'BootForm' not found
However when I checked the vendor directory, the files are there.
So I ran this command.
php artisan version
The site that uses the same dependency was this version.
Laravel Framework 5.5.23
The site that is not working was this version.
Laravel Framework 5.4.35
And when I check the files, the working site had this file.
bootstrap/cache/packages.php
Does that mean that I have to update the laravel version?

In laravel 5.5, a new feature was add called Package discovery
https://laravel.com/docs/5.5/packages#package-discovery
In laravel 5.4 you have to add your providers array located in the config/app.php file
that''s why you got an error on your 5.4 version and not in the 5.5 one :)

Related

Laravel's ui:auth command generating incompatible Controllers

I have a Laravel installation on v7.29.3 (our server won't support v8 yet)
I am having an issue with the ui:auth command. It is generating Controllers that reference classes in the Illuminate namespace that don't exist.
For example, the Auth\VerificationController class it gives me, uses Illuminate\Foundation\Auth\VerifiesEmails but I can't see a corresponding file in the /vendor/laravel/src/Illuminate/Foundation/Auth directory.
What's more, when I search for "VerifiesEmails" in the Laravel API doc for v7.x there is no such file. This file does exist however when I search for it in v6.x
So my guess is that I've got a mismatch somewhere and I'm getting v6 controllers for a v7 installation.
However, composer is showing that I have laravel/ui 2.5 which is supposed to be for Laravel 7.
I've tried deleting my composer.lock and vendor directories and reinstalling from composer in the hope that would clear up the issue, but no dice.
Any ideas what could be going on?
Those classes aren't in vendor/laravel/framework/src/.... They are not part of the framework. They come from the laravel/ui package, vendor/laravel/ui/auth-backend/....

Is it possible downgrade from laravel 7 to laravel 5.8?

I need to do the same project but i need to downgrade the version from laravel 7.* to laravel 5.8 because in my project is required php 7.1 ( I know this is not good but my boss want to do for a client )
Thanks
it is easy to do
first backup your laravel 7 project
second fresh install laravel 5.* in your machine.
and then copy your app , resource , routes and packeage.json and then fire command
composer install
if any error than solve one by one

Does laravel has any gems to extend or modify functionality?

Does laravel has gems like as ruby on rails have? Like, for signup flow ruby on rails has "devise" gem. Does laravel has anything like that?
There is no built-in package manager for Laravel but you can use reference like: https://packalyst.com . Here you can find all available packages for Laravel. All of them can be installed with Composer - php package manager. There is detail description how to install every pack in Packalyst.
If you want to have auth in Laravel you have two options. To do it manually, or to use the built-in module for authentication. You can run
php artisan make:auth
in the main project directory. This will add the required views and routes in the Laravel file structure in order to use the auth. Better to run this command on fresh installation. See this for detailed step by step authentication with Laravel 5: https://laravel.com/docs/5.5/authentication#authentication-quickstart

Laravel franzose package with latest version 5.2

I have installed laravel 5.2,
I can't able to use this package for laravel version 5.2
This plugin is easy way to integrate Category management
We can able to create, edit, update and delete a categories by using this package core library files,
Issue i met while installing this package for laravel version 5.2
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Franzose\ClosureTable\ClosureTableServiceProvider' not found
For your reference kindly please check this link:
https://github.com/franzose/ClosureTable

create laravel project with laravel installer

I am new to laravel framework,after some search I decided to use laravel 5.1
I read the official document and set the environment,also I install the laravel installer.but when I use laravel installer to create a project, it will use laravel newest version(such as 5.2.*).I want to know how can I specify the laravel version useing laravel installer?
I know I can specify laravel version using composer create-project ...,but for some reason when I using composer I must wait for long time.so is there a way useing laravel installer to create project with specified laravel?
You should be able to do it using this alternative laravel installer.
composer g require artesaos/laravel-installer
And then you can do:
laravel new name version
You may need to uninstall the previous installer you had.

Resources