PHP code example of avinash403 / laravel-dynamic-observer
1. Go to this page and download the library: Download avinash403/laravel-dynamic-observer 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/ */
avinash403 / laravel-dynamic-observer example snippets
//import ObserveModel trait
use ObserveModel\ObserveModel
class ExampleModel extends Model
{
//del
* @param ExampleModel $model instance of ExampleModel
* @return void
*/
private function beforeCreate($model)
{
//write your logic here
}
}