Laravel: Class not found if it is called from a Trait

After creating several Apps with Laravel and using softDelete properties I realized that methods like destroy(), restore() and kill() are exactly the same among several controllers. Therefore I am trying to put themn in a trait and use it from diferent Controllers. My code is as follows: ProfilesController.php <?php namespace App\Http\Controllers; class ProfilesController extends Controller…

How to solve failure name image on seed using faker Laravel 6

I create table ,this table named book i create a seeder to add data on table , this table have query like this. public function run() { $books = []; $faker = Faker\Factory::create(); $image_categories = [‘abstract’, ‘animals’, ‘business’, ‘cats’, ‘city’, ‘food’, ‘nature’, ‘technics’, ‘transport’]; for($i=0;$i<25;$i++){ $title = $faker->sentence(mt_rand(3, 6)); $title = str_replace(‘.’, ”, $title); $slug…

laravel-spark-google2fa Provider class not found after Spark update to v9.0

I recently updated a Laravel/Spark web application to the latest version of Spark (v9.*) via composer. Another package I use is Laravel-Spark-Google2FA which I also updated from v1.* to v2.*. Setup: The laravel-spark-google2fa package has a Laravel service provider class that resides in /project-root/laravel/spark/src/Providers/Google2FAServiceProvider.php In Laravel we specify this in /project-root/laravel/config/app.php with the following line…