Skip to content
forked from Malekfar/panel

Extra admin panel with the ability to define management, roles and they access

License

Notifications You must be signed in to change notification settings

amiranbari/panel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation can be found here: https://amiranbari.github.io/panel/

  1. Config your database in .env.

  2. Run: composer require amiranbari/panel:dev-master

  3. Run: php artisan vendor:publish - Then select 1.

  4. Chang locale to fa in config/app.php

Laravel 8

Put this in User.php in Models directory

use Spatie\Permission\Traits\HasRoles;

In User class: use HasFactory, Notifiable, HasRoles;

Add level to fillable fields.

Change composer.json autoload section like below"

   "autoload": {
           "psr-4": {
               "App\\": "app/",
               "Database\\Factories\\": "database/factories/",
               "Database\\Seeders\\": "database/seeders/"
           },
   		"files": [ "app/Tools/helpers.php" ]
       }   

Run: composer dump-autoload

Change user provider model in auth.php in config directory like below:

    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],

        // 'users' => [
        //     'driver' => 'database',
        //     'table' => 'users',
        // ],
    ],
    

Add these seeders call in DatabaseSeeder.php:

	$this->call(Panel_MenuSeeder::class);
	$this->call(Panel_PermissionSeeder::class);
	$this->call(Panel_UserSeeder::class);
  • php artisan migrate --seed

  • php artisan serve

Go to 127.0.0.1:8000/panel/login

Email: admin@gmail.com Password: 123456

Enjoy it.

About

Extra admin panel with the ability to define management, roles and they access

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.4%
  • CSS 5.8%
  • HTML 1.8%
  • Blade 1.4%
  • PHP 0.6%