<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jefremassingue / spatie-permission-generate example snippets
php
// Run synchronizelPermission method to generate permissions
$hasGenarate = \Jefre\SpatiePermissionGenerate\SpatiePermissionGenerate::synchronizelPermission();
php
// Set the following keys in your `.env` file:
SPG_CONTROLLERS_ROOT_PATH='app/Http/Controllers'
SPG_IGNORE_CLASSES_FILES='Controller,Helper\Upload, Other classes you want ignore'
SPG_CONTROLLER_CLASSES_SUFFIX='Controller,_controller'
SPG_IGNORE_METHODS_AND_FUNCTIONS='__construct'
SPG_DEFAULT_GUARD='web'
php
namespace App\Http\Controllers\API;
...
class UserController extends Controller
{
public function __construct() {}
public function index(){}
public function create(){}
public function store(Request $request){}
public function show($id){}
public function edit($id){}
public function update(Request $request, $id){}
public function destroy($id){}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.