sujan-sht / admin-master
Laravel Admin Panel
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^7.4|^8.0
- laravel/breeze: ^1.21
- livewire/livewire: ^2.12
- rappasoft/laravel-livewire-tables: ^2.14
Requires (Dev)
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^9.0
README
Installation
You can install the package via composer:
composer require sujan-sht/admin-master
Usage
To use the admin panel, you must publish the required assets and configuration files. Run the following commands:
php artisan vendor:publish --tag=admin-master-config php artisan vendor:publish --tag=media-library-modules php artisan vendor:publish --provider="Rappasoft\LaravelLivewireTables\LaravelLivewireTablesServiceProvider" --tag=livewire-tables-config php artisan vendor:publish --tag=admin-master-seeders
These will publish:
-
Public assets (CSS, JS)
-
Configuration file (config/admin-master.php)
-
Media library module scaffolding (app/Modules)
After publishing, In config/livewire-tables.php file
'theme' => 'bootstrap-4',
Add AdminMasterUser Trait in Your User Model
use SujanSht\AdminMaster\Traits\AdminMasterUser; class User extends Authenticatable { use AdminMasterUser; }
To migrate tables
php artisan migrate
Seed the database to create superadmin,dummy roles and permissions
php artisan db:seed RoleSeeder php artisan db:seed UserSeeder php artisan db:seed PermissionSeeder
You can now login superadmin user using this credentials
email: admin@admin.com password: admin123
In config/app.php add this line.
'providers' => ServiceProvider::defaultProviders()->merge([ ...... App\Providers\AdminServiceProvider::class ])->toArray(),
In routes/web.php add this line
Route::admin();
You can simply generate CRUD using command/by creating menu from admin panel that will generate all the files in repository pattern.
php artisan make:crud Test
Install Media Library
Include Package Path In composer.json .
"repositories": { "spatie/laravel-medialibrary-pro": { "type": "path", "url": "app/Modules", "options": { "symlink": true } } }
After adding it in composer.json, run the command
composer require spatie/laravel-medialibrary-pro:dev-main
Optional
To customize configuration, views, migrations, and seeders, you may also publish:
php artisan vendor:publish --tag=admin-master-assets php artisan vendor:publish --tag=admin-master-views php artisan vendor:publish --tag=admin-master-migrations
These allow you to:
-
Override package blade views
-
Modify database migrations and seeders as needed
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email sujanstha016@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.