1. Go to this page and download the library: Download saeedvir/laravel-modular 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/ */
saeedvir / laravel-modular example snippets
namespace Modules\Blog\Models;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
protected $fillable = ['title', 'content', 'slug'];
}
use Illuminate\Support\Facades\Route;
use Modules\Blog\Http\Controllers\PostController;
// Routes are automatically prefixed with 'blog'
Route::get('/', [PostController::class, 'index'])->name('index');
Route::resource('posts', PostController::class);