PHP code example of vleroy / laravel-gen
1. Go to this page and download the library: Download vleroy/laravel-gen 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/ */
vleroy / laravel-gen example snippets
// Source -> resources/templates/Model/app/Models/{ModelName}.php
// Destination -> app/Models/Post.php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
protected $table = "posts";
...
}
bash
├── app
│ ├── ...
├── artisan
├── bootstrap
│ ├── ...
├── composer.json
├── config
│ ├── ...
├── database
│ ├── ...
├── public
│ ├── ...
├── resources
│ ├── ...
│ ├── templates
│ │ └── Model
│ │ ├── app
│ │ │ ├── Http
│ │ │ │ └── Controllers
│ │ │ │ └── {ModelName}Controller.php
│ │ │ ├── Models
│ │ │ │ └── {ModelName}.php
│ │ │ └── Services
│ │ │ └── {ModelName}Service.php
│ │ └── routes
│ │ └── {model_name}.php
├── routes
│ ├── ...
├── server.php
├── storage
│ ├── ...