Skip to content

Main Master is a CRUD generator for Laravel projects. This project was created to make it easier for developers to create Laravel projects. This project is built with Laravel 10 and Bootstrap 5.

Notifications You must be signed in to change notification settings

arwahyu01/main-master

Repository files navigation

Laravel Logo

PHP Framework For Web Artisans

Main Master

( Crud Generator )

Main Master is a CRUD generator for Laravel projects. This project was created to make it easier for developers to create Laravel projects. This project is built with Laravel 11 and Bootstrap 5.

Made with ❤️ by arwp

Requirements

  • Laravel 11 or higher
  • PHP 8.2 or higher
  • MySQL 5.7 or higher or any other database
  • Composer 2.2.* or higher

Features Master

  • Login with authentication (email and password)
  • CRUD with ajax request
  • role and permission management
  • Sidebar notification
  • Header notification
  • Create a menu seeder and access the menu using the php artisan app:convert-menu command.
  • Morph File
  • Default Menu
    • Dashboard
    • Menu with sub menu (multi level)
    • Role Management
      • Access Group
      • Level Access
      • Access Menu
    • Faq
    • user management
    • Announcement

How to install

# From Packagist
$ composer create-project arwp/main-master {your-project-name}
# ---- OR -----
# Clone the repository
$ git clone https://github.com/arwahyu01/main-master.git {your-project-name}
$ cd main-master
$ composer install
$ cp .env.example .env
$ php artisan key:generate
$ php artisan migrate --seed
$ php artisan serve # or use valet

Custom Script

For Datatables

  • use this script to send multiple data to 'datatable.blade.js'
    <script type="application/javascript">
        fetch("{{ url('/js/'.$backend.'/'.$page->code.'/datatable.js') }}", {
            method: 'POST',
            headers: {
                "X-CSRF-TOKEN": "{{ csrf_token() }}",
                "Content-Type": "application/json"
            },
            body: JSON.stringify({id: "{{ $id }}"})
        })
        .then(e => e.text())
        .then(r => {
            Function('"use strict";\n' + r)();
        }).catch(e => console.log(e));
    </script>
  • JSON.stringify({'id': "{{ $id }}",'id2': "{{ $id2 }}"}) for multiple request
  • JSON.stringify({id: "{{ $id }}"}) for single request
  • Add $id, in datatable.blade.js file like this :
    $('#datatable').DataTable({
        ajax: `{{ url(config('master.app.url.backend').'/'.$url.'/data?id='${id}') }}`,
    });

Features for developer (MVC Builder) :

Install this package to your laravel project

composer require arwp/mvc

Don't forget to set the configuration, read more here

How to use this package :

  • Run php artisan make:mvc [name] in your terminal to create a module
    • Controller (with CRUD function)
    • Model (with fillable and relation)
    • Migration (with table and relation)
    • views (with CRUD function)
    • routes
  • Run php artisan migrate to create table
    • add new menu in menu table
    • add access menu in access menu table
  • Run php artisan delete:mvc [name] to delete a module (delete all file and table in database)

License

  • MVC Builder Package: This package is offered with no license, making it free to use for personal projects.
  • Eduadmin Template: The Eduadmin template used for the views in this package is not free. You'll need to purchase a license for commercial use from here.
  • Copyright and Attribution: Please respect the copyright of the package and its contributors. Do not remove the credits included within the files.

I hope this MVC Builder makes your development process faster and easier! 😊

About

Main Master is a CRUD generator for Laravel projects. This project was created to make it easier for developers to create Laravel projects. This project is built with Laravel 10 and Bootstrap 5.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published