PHP code example of mont4 / laravelmaker

1. Go to this page and download the library: Download mont4/laravelmaker 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/ */

    

mont4 / laravelmaker example snippets


Gate::guessPolicyNamesUsing(function ($modelClass) {
    $path = str_replace("\\Models\\", "\\Policies\\", $modelClass) . 'Policy';

    return $path;
});
 bash
$ php artisan make:all
$ php artisan permission:sync
$ php artisan make:method