PHP code example of achalj09 / editresource
1. Go to this page and download the library: Download achalj09/editresource 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/ */
achalj09 / editresource example snippets
composer
use Achalj09\Editresource\Editresource;
Editresource::make('Edit','edit')
->details([
'href' => function () {
return "../../createjobs/{$this->id}/edit";
},
'text' => function () {
return 'edit';
},
])->onlyOnIndex()
->canSee(function ($request) {
return $request->user()->can('Update Jobs', $this);
}),