1. Go to this page and download the library: Download f-oris/laravel-extension 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/ */
// ...
use Foris\LaExtension\Traits\Models\StatusOperation;
use Foris\LaExtension\Traits\Models\StatusDefinition;
class Resource extends Model implements StatusDefinition
{
use StatusOperation;
protected $guarded = ['id'];
}
//...
use Foris\LaExtension\Traits\Repositories\StatusOperation;
class ResourceRepository extends CrudRepository
{
use StatusOperation;
//...
}
//...
use Foris\LaExtension\Traits\Services\StatusOperation;
class ResourceService extends CrudService
{
use StatusOperation
//...
}
//...
use Foris\LaExtension\Traits\Controllers\StatusOperation;
class ResourceController extends Controller
{
use ResourceOperation, ExtResponse, StatusOperation, SelectOption;
//...
}