PHP code example of morganrowse / laravelcrud

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

    

morganrowse / laravelcrud example snippets


...
Route::resource('posts','View\\PostController');
...

...
Route::apiResource('posts','PostController');
...
bash
$ php artisan make:crud posts

app
│   Post.php
└───Http
│   └───Controllers
│   │   │   PostController.php
│   |   └───View
│   │   │   |   PostController.php
│   └───Requests
│   │   └───Post
│   │   │   │   DestroyPost.php
│   │   │   │   StorePost.php
│   │   │   │   UpdatePost.php
│   └───Resources
│   │   │   PostResource.php
resources
└───views
│   └───posts
│   │   │   create.blade.php
│   │   │   edit.blade.php
│   │   │   index.blade.php
│   │   │   show.blade.php