I've created a file call ModuleServiceProvider.php, in register method I add:
public function register()
{
// override query builder pagination
$this->app->singleton(
'Illuminate\\Pagination\\LengthAwarePaginator',
'App\\Helpers\\LengthAwarePaginator'
);
$this->app->singleton(
'Illuminate\\Validation\\ValidationException',
'App\\Helpers\\ValidationException'
);
}
As you can see, I can override LengthAwarePaginator class but I can not with ValidationException. I dont remember command which can help me create cache file, in this I can see one line like that 'Illuminate\Pagination\LengthAwarePaginator' => 'App\Helpers\LengthAwarePaginator'. My question is:
- Which command is?
- Why dont I override ValidationException and why it does not working?
- Where I can see list of override class?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire