PHP code example of scalexy / laravel-tools
1. Go to this page and download the library: Download scalexy/laravel-tools library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
scalexy / laravel-tools example snippets
use ScaleXY\Tools\Attributes\AutoRun;
use ScaleXY\Tools\Traits\AutoRunTrait;
class User extends Model
{
use AutoRunTrait;
#[AutoRun('creating')]
protected function setDefaults(): void
{
// ...
}
#[AutoRun('updating', 'updated')]
protected function syncSearchIndex($user): void
{
// ...
}
}