I have two traits file with the same class:
app/Traits/OperationTools_OLD.php
app/Traits/OperationTools.php
The two files contain the same class name like the following:
<?php
namespace App\Traits;
use Carbon\Carbon;
use App\Http\Helpers\FoxUtils;
use App\Operation;
trait OperationTools {
use \App\Traits\CavityTools;
public function getProduction(...
The app does not recognize the code of the new file OperationTools.php
and it looks to execute the code of the old one.
I have tried to change the trait name of the old file to be trait OperationTools_OLD
, but now I get the error when I try to use it:
Trait 'App\Traits\OperationTools' not found
I think that there is what is like, a class file map, in the app that should be refreshed but I don't know how?
I have tried artisan config:clear, view:clear
but the issue is the same.
I'm using laravel-5.4 and php-7.4 on Ubuntu and Apache.
CodePudding user response:
Run composer dump-autoload
to create a new autoload file