How to make a Trait in Laravel
Well, laravel follows PSR-4 so you should place your traits in: app/Traits You then need to make sure you namespace your trait with that path, so place: namespace App\Traits; At the top of your trait Then make sure when you save the file, the file name matches the trait name. So, if your trait is … Read more