In Laravel, if we use a trait with an Eloquent model we get some extramagicthrown in. You can boot your traits by adding aboot[TraitName]method to it. So for our exampleSluggabletrait the method would be namedb
When using traits with Eloquent models, Laravel has a neat trick thatbootsthe trait allowing us to hook into the Eloquent events. Laravel’s ownSoftDeletestraituses this bootable feature to add a global scope that allows us to soft delete a model. To take a look at how we can use traits...
use Mediconesystems\LivewireDatatables\Traits\CanPinRecords; class RecordTable extends LivewireDatatable { use CanPinRecords; public $model = Record::class; public function columns() { return [ Column::checkbox(), // ...Custom column names...
In the simplest way you just go through your Auth Controllers and change namespaces from the traits which are currently implemented from Laravel.You can change structure to suit your needs. Please be aware of the @extend statement in the blade file to fit into your project structure. At the ...