PHP code example of opanegro / nova-custom-controller
1. Go to this page and download the library: Download opanegro/nova-custom-controller 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/ */
opanegro / nova-custom-controller example snippets
...
use Opanegro\NovaCustomController\Traits\NovaCustomEvents;
abstract class Resource extends NovaResource
{
use NovaCustomEvents;
...
}
class User extends Resource
{
...
/**
* Before updated in controller
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Database\Eloquent\Model $model
*/
public static function beforeUpdated(Request $request, Model $model)
{
// your codes
}
}