arwp/main-master

Automated framework for building CRUD web application

Installs: 49

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:project

v1.1.4 2023-10-29 15:46 UTC

This package is auto-updated.

Last update: 2024-04-06 16:15:28 UTC


README

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 10 and Bootstrap 5.

Made with ❤️ by arwp

Requirements

  • Laravel 10 or higher
  • PHP 8.1 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

  • No License (free to use for personal) README.md
  • Template Eduadmin is not free; you can buy it here
  • Don't remove the credits in any of the files

I hope this project can help you to make your project faster and easier to develop :)