1. Go to this page and download the library: Download carlosafonso/laravel-crud 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/ */
carlosafonso / laravel-crud example snippets
use Afonso\LvCrud\Controllers\CrudController;
class FoosController extends CrudController
{
//
}
public function getModelNamespace()
{
return 'My\\Custom\\Namespace';
}
/*
* In this example we're only supporting JSON responses.
*/
public function supportsJson()
{
return true;
}
public function supportsHtml()
{
return false;
}
class MyController extends CrudController
{
protected $readOnly = true;
}