for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace App\Modules\Groups\ModelObservers;
/**
* Handling of model events,
*/
class AclGroupObserver
{
public function saving($model)
$model
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
//
}
public function saved($model)
public function creating($model)
public function created($model)
* Prevent updating of the admin group.
*
* @param object $model the model beign updated.
* @return void
public function updating($model)
if ($model->getOriginal('name') == 'Admin') {
\ErrorHandler::noPermissions();
public function updated($model)
* Prevent deleting the admin group.
* @param object $model the delted model.
public function deleting($model)
public function deleted($model)
public function restoring($model)
public function restored($model)
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.