PHP code example of taksu-tech / laravel-restful
1. Go to this page and download the library: Download taksu-tech/laravel-restful 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/ */
taksu-tech / laravel-restful example snippets
class Admin extends Model
{
use ModelCommonTrait;
...
}
namespace App\Http\Controllers;
use App\Models\Admin;
use Taksu\Restful\Controllers\CrudController;
class AdminController extends CrudController
{
public function __construct()
{
parent::__construct(Admin::class);
}
}
public function boot()
{
if ($this->app->runningInConsole()) {
$this->commands([
Taksu\Console\Commands\MakeCrudController::class,
]);
}
}