├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── AdminController.php │ │ │ ├── PermissionController.php │ │ │ ├── ProfileController.php │ │ │ ├── RoleController.php │ │ │ └── UserController.php │ │ ├── Auth │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ └── HomeController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── ChangePasswordRequest.php │ │ ├── StorePermissionRequest.php │ │ ├── StoreRoleRequest.php │ │ ├── UpdatePermissionRequest.php │ │ ├── UpdateProfileRequest.php │ │ └── UpdateRoleRequest.php ├── Models │ └── User.php └── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── breadcrumbs.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── devstarit.php ├── filesystems.php ├── flasher.php ├── hashing.php ├── logging.php ├── mail.php ├── permission.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ └── 2023_06_20_033844_create_permission_tables.php └── seeders │ ├── DatabaseSeeder.php │ ├── PermissionsTableSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ ├── custom.css │ └── dashboard.css ├── favicon.ico ├── images │ ├── admin │ │ └── customer-support.png │ └── placeholder-post.png ├── index.php ├── js │ └── color-modes.js ├── robots.txt └── vendor │ └── flasher │ ├── flasher.min.css │ └── flasher.min.js ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── admin │ ├── includes │ │ ├── breadcrumb.blade.php │ │ ├── flash.blade.php │ │ ├── footer.blade.php │ │ ├── navbar.blade.php │ │ └── sidebar.blade.php │ ├── index.blade.php │ ├── permissions │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── profile │ │ ├── change-password.blade.php │ │ └── edit.blade.php │ ├── roles │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ └── users │ │ ├── create.blade.php │ │ └── index.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── home.blade.php │ ├── layouts │ ├── app.blade.php │ └── master.blade.php │ └── welcome.blade.php ├── routes ├── admin.php ├── api.php ├── breadcrumbs.php ├── channels.php ├── console.php └── web.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── vite.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=admin_starter 15 | DB_USERNAME=root 16 | DB_PASSWORD= 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | FILESYSTEM_DISK=local 21 | QUEUE_CONNECTION=sync 22 | SESSION_DRIVER=file 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=smtp 32 | MAIL_HOST=mailpit 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS="hello@example.com" 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | AWS_ACCESS_KEY_ID= 41 | AWS_SECRET_ACCESS_KEY= 42 | AWS_DEFAULT_REGION=us-east-1 43 | AWS_BUCKET= 44 | AWS_USE_PATH_STYLE_ENDPOINT=false 45 | 46 | PUSHER_APP_ID= 47 | PUSHER_APP_KEY= 48 | PUSHER_APP_SECRET= 49 | PUSHER_HOST= 50 | PUSHER_PORT=443 51 | PUSHER_SCHEME=https 52 | PUSHER_APP_CLUSTER=mt1 53 | 54 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 55 | VITE_PUSHER_HOST="${PUSHER_HOST}" 56 | VITE_PUSHER_PORT="${PUSHER_PORT}" 57 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" 58 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 59 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | auth.json 15 | npm-debug.log 16 | yarn-error.log 17 | /.fleet 18 | /.idea 19 | /.vscode 20 | .DS_Store 21 | yarn.lock 22 | package-lock.json 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Admin Dashboard with Bootstrap 5.3 2 | 3 | ## Features 4 | 5 | The Laravel Admin Dashboard is a web-based application that serves as a starting point for an Admin Dashboard panel, complete with User Management and Roles Permissions. 6 | 7 | - Constructed using Laravel 10 8 | - Incorporates Bootstrap 5.3 9 | - Features an Authentication System 10 | - Includes User Management with a Block/Unblock System 11 | - Equipped with a Roles Permissions System 12 | - Allows User Profile Viewing and Updating 13 | - Enables User Password Changes 14 | - More features to be added soon 15 | 16 | ## Contributing 17 | 18 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). 19 | 20 | ## Code of Conduct 21 | 22 | In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). 23 | 24 | ## Security Vulnerabilities 25 | 26 | If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. 27 | 28 | ## License 29 | 30 | The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). 31 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 16 | } 17 | 18 | /** 19 | * Register the commands for the application. 20 | */ 21 | protected function commands(): void 22 | { 23 | $this->load(__DIR__.'/Commands'); 24 | 25 | require base_path('routes/console.php'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $dontFlash = [ 16 | 'current_password', 17 | 'password', 18 | 'password_confirmation', 19 | ]; 20 | 21 | /** 22 | * Register the exception handling callbacks for the application. 23 | */ 24 | public function register(): void 25 | { 26 | $this->reportable(function (Throwable $e) { 27 | // 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/AdminController.php: -------------------------------------------------------------------------------- 1 | name = $request->name; 44 | 45 | if ($permission->save()) { 46 | flash()->addSuccess('Permission successfully created.'); 47 | return redirect()->route('admin.permissions.index'); 48 | } 49 | flash()->addError('Whoops! Permission create failed!'); 50 | return redirect()->back(); 51 | } 52 | 53 | /** 54 | * Display the specified resource. 55 | */ 56 | public function show(Permission $permission) 57 | { 58 | abort_if(Gate::denies('permission_show'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 59 | 60 | return view('admin.permissions.show', compact('permission')); 61 | } 62 | 63 | /** 64 | * Show the form for editing the specified resource. 65 | */ 66 | public function edit(Permission $permission) 67 | { 68 | abort_if(Gate::denies('permission_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 69 | 70 | return view('admin.permissions.edit', compact('permission')); 71 | } 72 | 73 | /** 74 | * Update the specified resource in storage. 75 | */ 76 | public function update(UpdatePermissionRequest $request, Permission $permission) 77 | { 78 | $permission->update($request->all()); 79 | flash()->addSuccess('Permission successfully updated.'); 80 | return redirect()->route('admin.permissions.index'); 81 | } 82 | 83 | /** 84 | * Remove the specified resource from storage. 85 | */ 86 | public function destroy(Permission $permission) 87 | { 88 | abort_if(Gate::denies('permission_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 89 | 90 | $permission->delete(); 91 | flash()->addInfo('Permission deleted successfully.'); 92 | return back(); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/ProfileController.php: -------------------------------------------------------------------------------- 1 | id()); 25 | $user->name = $request->name; 26 | $user->email = $request->email; 27 | 28 | if ($user->save()) { 29 | flash()->addSuccess('Profile Profile successfully.'); 30 | return redirect()->back(); 31 | } 32 | flash()->addError('Password update fail!.'); 33 | return redirect()->back()->with('error', 'Profile update fail!'); 34 | } 35 | 36 | public function password() 37 | { 38 | return view('admin.profile.change-password'); 39 | } 40 | 41 | public function updatePassword(ChangePasswordRequest $request) 42 | { 43 | #Match The Old Password 44 | if (!Hash::check($request->old_password, auth()->user()->password)) { 45 | return back()->with("error", "Old Password Doesn't match!"); 46 | } 47 | 48 | #Update the new Password 49 | $updated = User::whereId(auth()->user()->id)->update([ 50 | 'password' => Hash::make($request->new_password) 51 | ]); 52 | 53 | if ($updated) { 54 | flash()->addSuccess('Password changed successfully.'); 55 | return redirect()->back(); 56 | } else { 57 | flash()->addError('Password change fail!.'); 58 | return redirect()->back(); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/RoleController.php: -------------------------------------------------------------------------------- 1 | pluck('name', 'id'); 29 | 30 | return view('admin.roles.create', compact('permissions')); 31 | } 32 | 33 | public function store(StoreRoleRequest $request) 34 | { 35 | $role = Role::create(['name' => $request->name]); 36 | $role->permissions()->sync($request->input('permissions', [])); 37 | 38 | flash()->addSuccess('Role saved successfully.'); 39 | 40 | return redirect()->route('admin.roles.index'); 41 | } 42 | 43 | public function edit(Role $role) 44 | { 45 | abort_if(Gate::denies('role_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 46 | 47 | $permissions = Permission::all()->pluck('name', 'id'); 48 | 49 | $role->load('permissions'); 50 | 51 | return view('admin.roles.edit', compact('permissions', 'role')); 52 | } 53 | 54 | public function update(UpdateRoleRequest $request, Role $role) 55 | { 56 | $role->update(['name' => $request->name]); 57 | $role->permissions()->sync($request->input('permissions', [])); 58 | flash()->addSuccess('Role updated successfully.'); 59 | 60 | return redirect()->route('admin.roles.index'); 61 | } 62 | 63 | public function show(Role $role) 64 | { 65 | abort_if(Gate::denies('role_show'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 66 | 67 | $role->load('permissions'); 68 | 69 | return view('admin.roles.show', compact('role')); 70 | } 71 | 72 | public function destroy(Role $role) 73 | { 74 | abort_if(Gate::denies('role_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 75 | 76 | $role->delete(); 77 | flash()->addSuccess('Role deleted successfully.'); 78 | return back(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/UserController.php: -------------------------------------------------------------------------------- 1 | paginate(15); 21 | 22 | return view('admin.users.index', compact('users')); 23 | } 24 | 25 | /** 26 | * Show the form for creating a new resource. 27 | * 28 | * @return \Illuminate\Http\Response 29 | */ 30 | public function create() 31 | { 32 | abort_if(Gate::denies('permission_create'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 33 | return view('admin.users.create'); 34 | 35 | } 36 | 37 | /** 38 | * Store a newly created resource in storage. 39 | * 40 | * @param \Illuminate\Http\Request $request 41 | * @return \Illuminate\Http\Response 42 | */ 43 | public function store(Request $request) 44 | { 45 | // 46 | $validatedData = $request->validate([ 47 | 'name' => 'required|regex:/^([a-zA-Z]+)(\s[a-zA-Z]+)*$/|max:255', 48 | 'email' => 'required|email|unique:users,email|max:255', 49 | 'password' => 'required|string|min:8', // Adjust the min length as per your requirements 50 | ]); 51 | 52 | $user = new User(); 53 | 54 | $user->name = $request->name; 55 | $user->email = $request->email; 56 | $user->password = $request->password; 57 | 58 | if ($user->save()) { 59 | flash()->addSuccess('User created successfully.'); 60 | return redirect()->route('admin.users.index'); 61 | } 62 | flash()->addError('User create fail!'); 63 | return redirect()->route('admin.users.index'); 64 | } 65 | 66 | /** 67 | * Display the specified resource. 68 | * 69 | * @param int $id 70 | * @return \Illuminate\Http\Response 71 | */ 72 | public function show($id) 73 | { 74 | // 75 | } 76 | 77 | /** 78 | * Show the form for editing the specified resource. 79 | * 80 | * @param int $id 81 | * @return \Illuminate\Http\Response 82 | */ 83 | public function edit($id) 84 | { 85 | // 86 | } 87 | 88 | /** 89 | * Update the specified resource in storage. 90 | * 91 | * @param \Illuminate\Http\Request $request 92 | * @param int $id 93 | * @return \Illuminate\Http\Response 94 | */ 95 | public function update(Request $request, $id) 96 | { 97 | // 98 | } 99 | 100 | /** 101 | * Remove the specified resource from storage. 102 | * 103 | * @param int $id 104 | * @return \Illuminate\Http\Response 105 | */ 106 | public function destroy($id) 107 | { 108 | // 109 | } 110 | 111 | public function banUnban($id, $status) 112 | { 113 | if (auth()->user()->hasRole('Admin')){ 114 | $user = User::findOrFail($id); 115 | $user->status = $status; 116 | if ($user->save()){ 117 | flash()->addSuccess('User status updated successfully.'); 118 | return redirect()->back(); 119 | } 120 | flash()->addError('User status update fail!'); 121 | return redirect()->back(); 122 | } 123 | return redirect(Response::HTTP_FORBIDDEN, '403 Forbidden'); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 42 | } 43 | 44 | /** 45 | * Get a validator for an incoming registration request. 46 | * 47 | * @param array $data 48 | * @return \Illuminate\Contracts\Validation\Validator 49 | */ 50 | protected function validator(array $data) 51 | { 52 | return Validator::make($data, [ 53 | 'name' => ['required', 'string', 'max:255'], 54 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 55 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 56 | ]); 57 | } 58 | 59 | /** 60 | * Create a new user instance after a valid registration. 61 | * 62 | * @param array $data 63 | * @return \App\Models\User 64 | */ 65 | protected function create(array $data) 66 | { 67 | return User::create([ 68 | 'name' => $data['name'], 69 | 'email' => $data['email'], 70 | 'password' => Hash::make($data['password']), 71 | ]); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Contracts\Support\Renderable 23 | */ 24 | public function index() 25 | { 26 | return view('home'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | protected $middleware = [ 17 | // \App\Http\Middleware\TrustHosts::class, 18 | \App\Http\Middleware\TrustProxies::class, 19 | \Illuminate\Http\Middleware\HandleCors::class, 20 | \App\Http\Middleware\PreventRequestsDuringMaintenance::class, 21 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, 22 | \App\Http\Middleware\TrimStrings::class, 23 | \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, 24 | ]; 25 | 26 | /** 27 | * The application's route middleware groups. 28 | * 29 | * @var array> 30 | */ 31 | protected $middlewareGroups = [ 32 | 'web' => [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 37 | \App\Http\Middleware\VerifyCsrfToken::class, 38 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 39 | ], 40 | 41 | 'api' => [ 42 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 43 | \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', 44 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | ], 46 | ]; 47 | 48 | /** 49 | * The application's middleware aliases. 50 | * 51 | * Aliases may be used instead of class names to conveniently assign middleware to routes and groups. 52 | * 53 | * @var array 54 | */ 55 | protected $middlewareAliases = [ 56 | 'auth' => \App\Http\Middleware\Authenticate::class, 57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 58 | 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, 59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 63 | 'signed' => \App\Http\Middleware\ValidateSignature::class, 64 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 65 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 66 | ]; 67 | } 68 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : route('login'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 24 | return redirect(RouteServiceProvider::HOME); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts(): array 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/ValidateSignature.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 'fbclid', 16 | // 'utm_campaign', 17 | // 'utm_content', 18 | // 'utm_medium', 19 | // 'utm_source', 20 | // 'utm_term', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Requests/ChangePasswordRequest.php: -------------------------------------------------------------------------------- 1 | 'required|string|min:8', 28 | 'new_password' => 'required|string|min:8|confirmed', 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/StorePermissionRequest.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | 'name' => 'required' 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreRoleRequest.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | 'name' => 'required' 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdatePermissionRequest.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | 'name' => 'required' 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateProfileRequest.php: -------------------------------------------------------------------------------- 1 | 'required|string', 28 | 'email' => 'required|email|unique:users,email,'.auth()->id(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateRoleRequest.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | 'name' => 'required' 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | protected $fillable = [ 22 | 'name', 23 | 'email', 24 | 'password', 25 | 'status' 26 | ]; 27 | 28 | /** 29 | * The attributes that should be hidden for serialization. 30 | * 31 | * @var array 32 | */ 33 | protected $hidden = [ 34 | 'password', 35 | 'remember_token', 36 | ]; 37 | 38 | /** 39 | * The attributes that should be cast. 40 | * 41 | * @var array 42 | */ 43 | protected $casts = [ 44 | 'email_verified_at' => 'datetime', 45 | 'password' => 'hashed', 46 | ]; 47 | } 48 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $policies = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | */ 22 | public function boot(): void 23 | { 24 | // 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | > 16 | */ 17 | protected $listen = [ 18 | Registered::class => [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | */ 26 | public function boot(): void 27 | { 28 | // 29 | } 30 | 31 | /** 32 | * Determine if events and listeners should be automatically discovered. 33 | */ 34 | public function shouldDiscoverEvents(): bool 35 | { 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | by($request->user()?->id ?: $request->ip()); 29 | }); 30 | 31 | $this->routes(function () { 32 | Route::middleware('api') 33 | ->prefix('api') 34 | ->group(base_path('routes/api.php')); 35 | 36 | Route::middleware('web') 37 | ->group(base_path('routes/web.php')); 38 | 39 | Route::middleware('web') 40 | ->group(base_path('routes/admin.php')); 41 | }); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The skeleton application for the Laravel framework.", 5 | "keywords": ["laravel", "framework"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^8.1", 9 | "diglactic/laravel-breadcrumbs": "^8.1", 10 | "guzzlehttp/guzzle": "^7.2", 11 | "intervention/image": "^2.7", 12 | "laravel/framework": "^10.10", 13 | "laravel/sanctum": "^3.2", 14 | "laravel/tinker": "^2.8", 15 | "laravel/ui": "^4.2", 16 | "php-flasher/flasher-laravel": "^1.15", 17 | "spatie/laravel-permission": "^5.10" 18 | }, 19 | "require-dev": { 20 | "fakerphp/faker": "^1.9.1", 21 | "laravel/pint": "^1.0", 22 | "laravel/sail": "^1.18", 23 | "mockery/mockery": "^1.4.4", 24 | "nunomaduro/collision": "^7.0", 25 | "phpunit/phpunit": "^10.1", 26 | "spatie/laravel-ignition": "^2.0" 27 | }, 28 | "autoload": { 29 | "psr-4": { 30 | "App\\": "app/", 31 | "Database\\Factories\\": "database/factories/", 32 | "Database\\Seeders\\": "database/seeders/" 33 | } 34 | }, 35 | "autoload-dev": { 36 | "psr-4": { 37 | "Tests\\": "tests/" 38 | } 39 | }, 40 | "scripts": { 41 | "post-autoload-dump": [ 42 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 43 | "@php artisan package:discover --ansi" 44 | ], 45 | "post-update-cmd": [ 46 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force" 47 | ], 48 | "post-root-package-install": [ 49 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 50 | ], 51 | "post-create-project-cmd": [ 52 | "@php artisan key:generate --ansi" 53 | ] 54 | }, 55 | "extra": { 56 | "laravel": { 57 | "dont-discover": [] 58 | } 59 | }, 60 | "config": { 61 | "optimize-autoloader": true, 62 | "preferred-install": "dist", 63 | "sort-packages": true, 64 | "allow-plugins": { 65 | "pestphp/pest-plugin": true, 66 | "php-http/discovery": true 67 | } 68 | }, 69 | "minimum-stability": "stable", 70 | "prefer-stable": true 71 | } 72 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Application Environment 24 | |-------------------------------------------------------------------------- 25 | | 26 | | This value determines the "environment" your application is currently 27 | | running in. This may determine how you prefer to configure various 28 | | services the application utilizes. Set this in your ".env" file. 29 | | 30 | */ 31 | 32 | 'env' => env('APP_ENV', 'production'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | Application Debug Mode 37 | |-------------------------------------------------------------------------- 38 | | 39 | | When your application is in debug mode, detailed error messages with 40 | | stack traces will be shown on every error that occurs within your 41 | | application. If disabled, a simple generic error page is shown. 42 | | 43 | */ 44 | 45 | 'debug' => (bool) env('APP_DEBUG', false), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Application URL 50 | |-------------------------------------------------------------------------- 51 | | 52 | | This URL is used by the console to properly generate URLs when using 53 | | the Artisan command line tool. You should set this to the root of 54 | | your application so that it is used when running Artisan tasks. 55 | | 56 | */ 57 | 58 | 'url' => env('APP_URL', 'http://localhost'), 59 | 60 | 'asset_url' => env('ASSET_URL'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Application Timezone 65 | |-------------------------------------------------------------------------- 66 | | 67 | | Here you may specify the default timezone for your application, which 68 | | will be used by the PHP date and date-time functions. We have gone 69 | | ahead and set this to a sensible default for you out of the box. 70 | | 71 | */ 72 | 73 | 'timezone' => 'UTC', 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Application Locale Configuration 78 | |-------------------------------------------------------------------------- 79 | | 80 | | The application locale determines the default locale that will be used 81 | | by the translation service provider. You are free to set this value 82 | | to any of the locales which will be supported by the application. 83 | | 84 | */ 85 | 86 | 'locale' => 'en', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Application Fallback Locale 91 | |-------------------------------------------------------------------------- 92 | | 93 | | The fallback locale determines the locale to use when the current one 94 | | is not available. You may change the value to correspond to any of 95 | | the language folders that are provided through your application. 96 | | 97 | */ 98 | 99 | 'fallback_locale' => 'en', 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Faker Locale 104 | |-------------------------------------------------------------------------- 105 | | 106 | | This locale will be used by the Faker PHP library when generating fake 107 | | data for your database seeds. For example, this will be used to get 108 | | localized telephone numbers, street address information and more. 109 | | 110 | */ 111 | 112 | 'faker_locale' => 'en_US', 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Encryption Key 117 | |-------------------------------------------------------------------------- 118 | | 119 | | This key is used by the Illuminate encrypter service and should be set 120 | | to a random, 32 character string, otherwise these encrypted strings 121 | | will not be safe. Please do this before deploying an application! 122 | | 123 | */ 124 | 125 | 'key' => env('APP_KEY'), 126 | 127 | 'cipher' => 'AES-256-CBC', 128 | 129 | /* 130 | |-------------------------------------------------------------------------- 131 | | Maintenance Mode Driver 132 | |-------------------------------------------------------------------------- 133 | | 134 | | These configuration options determine the driver used to determine and 135 | | manage Laravel's "maintenance mode" status. The "cache" driver will 136 | | allow maintenance mode to be controlled across multiple machines. 137 | | 138 | | Supported drivers: "file", "cache" 139 | | 140 | */ 141 | 142 | 'maintenance' => [ 143 | 'driver' => 'file', 144 | // 'store' => 'redis', 145 | ], 146 | 147 | /* 148 | |-------------------------------------------------------------------------- 149 | | Autoloaded Service Providers 150 | |-------------------------------------------------------------------------- 151 | | 152 | | The service providers listed here will be automatically loaded on the 153 | | request to your application. Feel free to add your own services to 154 | | this array to grant expanded functionality to your applications. 155 | | 156 | */ 157 | 158 | 'providers' => ServiceProvider::defaultProviders()->merge([ 159 | /* 160 | * Package Service Providers... 161 | */ 162 | 163 | /* 164 | * Application Service Providers... 165 | */ 166 | App\Providers\AppServiceProvider::class, 167 | App\Providers\AuthServiceProvider::class, 168 | // App\Providers\BroadcastServiceProvider::class, 169 | App\Providers\EventServiceProvider::class, 170 | App\Providers\RouteServiceProvider::class, 171 | ])->toArray(), 172 | 173 | /* 174 | |-------------------------------------------------------------------------- 175 | | Class Aliases 176 | |-------------------------------------------------------------------------- 177 | | 178 | | This array of class aliases will be registered when this application 179 | | is started. However, feel free to register as many as you wish as 180 | | the aliases are "lazy" loaded so they don't hinder performance. 181 | | 182 | */ 183 | 184 | 'aliases' => Facade::defaultAliases()->merge([ 185 | // 'Example' => App\Facades\Example::class, 186 | ])->toArray(), 187 | 188 | ]; 189 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication drivers have a user provider. This defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | mechanisms used by this application to persist your user's data. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | sources which represent each model / table. These sources may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => App\Models\User::class, 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may specify multiple password reset configurations if you have more 80 | | than one user table or model in the application and you want to have 81 | | separate password reset settings based on the specific user types. 82 | | 83 | | The expiry time is the number of minutes that each reset token will be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | | The throttle setting is the number of seconds a user must wait before 88 | | generating more password reset tokens. This prevents the user from 89 | | quickly generating a very large amount of password reset tokens. 90 | | 91 | */ 92 | 93 | 'passwords' => [ 94 | 'users' => [ 95 | 'provider' => 'users', 96 | 'table' => 'password_reset_tokens', 97 | 'expire' => 60, 98 | 'throttle' => 60, 99 | ], 100 | ], 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Password Confirmation Timeout 105 | |-------------------------------------------------------------------------- 106 | | 107 | | Here you may define the amount of seconds before a password confirmation 108 | | times out and the user is prompted to re-enter their password via the 109 | | confirmation screen. By default, the timeout lasts for three hours. 110 | | 111 | */ 112 | 113 | 'password_timeout' => 10800, 114 | 115 | ]; 116 | -------------------------------------------------------------------------------- /config/breadcrumbs.php: -------------------------------------------------------------------------------- 1 | 'breadcrumbs::bootstrap5', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Breadcrumbs File(s) 31 | |-------------------------------------------------------------------------- 32 | | 33 | | The file(s) where breadcrumbs are defined. e.g. 34 | | 35 | | - base_path('routes/breadcrumbs.php') 36 | | - glob(base_path('breadcrumbs/*.php')) 37 | | 38 | */ 39 | 40 | 'files' => base_path('routes/breadcrumbs.php'), 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Exceptions 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Determine when to throw an exception. 48 | | 49 | */ 50 | 51 | // When route-bound breadcrumbs are used but the current route doesn't have a name (UnnamedRouteException) 52 | 'unnamed-route-exception' => true, 53 | 54 | // When route-bound breadcrumbs are used and the matching breadcrumb doesn't exist (InvalidBreadcrumbException) 55 | 'missing-route-bound-breadcrumb-exception' => true, 56 | 57 | // When a named breadcrumb is used but doesn't exist (InvalidBreadcrumbException) 58 | 'invalid-named-breadcrumb-exception' => true, 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Classes 63 | |-------------------------------------------------------------------------- 64 | | 65 | | Subclass the default classes for more advanced customisations. 66 | | 67 | */ 68 | 69 | // Manager 70 | 'manager-class' => Diglactic\Breadcrumbs\Manager::class, 71 | 72 | // Generator 73 | 'generator-class' => Diglactic\Breadcrumbs\Generator::class, 74 | 75 | ]; 76 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', 41 | 'port' => env('PUSHER_PORT', 443), 42 | 'scheme' => env('PUSHER_SCHEME', 'https'), 43 | 'encrypted' => true, 44 | 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', 45 | ], 46 | 'client_options' => [ 47 | // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html 48 | ], 49 | ], 50 | 51 | 'ably' => [ 52 | 'driver' => 'ably', 53 | 'key' => env('ABLY_KEY'), 54 | ], 55 | 56 | 'redis' => [ 57 | 'driver' => 'redis', 58 | 'connection' => 'default', 59 | ], 60 | 61 | 'log' => [ 62 | 'driver' => 'log', 63 | ], 64 | 65 | 'null' => [ 66 | 'driver' => 'null', 67 | ], 68 | 69 | ], 70 | 71 | ]; 72 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | 'lock_path' => storage_path('framework/cache/data'), 56 | ], 57 | 58 | 'memcached' => [ 59 | 'driver' => 'memcached', 60 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 61 | 'sasl' => [ 62 | env('MEMCACHED_USERNAME'), 63 | env('MEMCACHED_PASSWORD'), 64 | ], 65 | 'options' => [ 66 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 67 | ], 68 | 'servers' => [ 69 | [ 70 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 71 | 'port' => env('MEMCACHED_PORT', 11211), 72 | 'weight' => 100, 73 | ], 74 | ], 75 | ], 76 | 77 | 'redis' => [ 78 | 'driver' => 'redis', 79 | 'connection' => 'cache', 80 | 'lock_connection' => 'default', 81 | ], 82 | 83 | 'dynamodb' => [ 84 | 'driver' => 'dynamodb', 85 | 'key' => env('AWS_ACCESS_KEY_ID'), 86 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 87 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 88 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 89 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 90 | ], 91 | 92 | 'octane' => [ 93 | 'driver' => 'octane', 94 | ], 95 | 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Cache Key Prefix 101 | |-------------------------------------------------------------------------- 102 | | 103 | | When utilizing the APC, database, memcached, Redis, or DynamoDB cache 104 | | stores there might be other applications using the same cache. For 105 | | that reason, you may prefix every cache key to avoid collisions. 106 | | 107 | */ 108 | 109 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 110 | 111 | ]; 112 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'search_path' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | // 'encrypt' => env('DB_ENCRYPT', 'yes'), 93 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), 94 | ], 95 | 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Migration Repository Table 101 | |-------------------------------------------------------------------------- 102 | | 103 | | This table keeps track of all the migrations that have already run for 104 | | your application. Using this information, we can determine which of 105 | | the migrations on disk haven't actually been run in the database. 106 | | 107 | */ 108 | 109 | 'migrations' => 'migrations', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Redis Databases 114 | |-------------------------------------------------------------------------- 115 | | 116 | | Redis is an open source, fast, and advanced key-value store that also 117 | | provides a richer body of commands than a typical key-value system 118 | | such as APC or Memcached. Laravel makes it easy to dig right in. 119 | | 120 | */ 121 | 122 | 'redis' => [ 123 | 124 | 'client' => env('REDIS_CLIENT', 'phpredis'), 125 | 126 | 'options' => [ 127 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 128 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 129 | ], 130 | 131 | 'default' => [ 132 | 'url' => env('REDIS_URL'), 133 | 'host' => env('REDIS_HOST', '127.0.0.1'), 134 | 'username' => env('REDIS_USERNAME'), 135 | 'password' => env('REDIS_PASSWORD'), 136 | 'port' => env('REDIS_PORT', '6379'), 137 | 'database' => env('REDIS_DB', '0'), 138 | ], 139 | 140 | 'cache' => [ 141 | 'url' => env('REDIS_URL'), 142 | 'host' => env('REDIS_HOST', '127.0.0.1'), 143 | 'username' => env('REDIS_USERNAME'), 144 | 'password' => env('REDIS_PASSWORD'), 145 | 'port' => env('REDIS_PORT', '6379'), 146 | 'database' => env('REDIS_CACHE_DB', '1'), 147 | ], 148 | 149 | ], 150 | 151 | ]; 152 | -------------------------------------------------------------------------------- /config/devstarit.php: -------------------------------------------------------------------------------- 1 | 'Laravel Admin Stater', 5 | 'app_desc' => 'Laravel Admin Stater', 6 | 'author' => 'Fazle Rabbi', 7 | 'version' => '1.0' 8 | ]; 9 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been set up for each driver as an example of the required values. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | 'throw' => false, 37 | ], 38 | 39 | 'public' => [ 40 | 'driver' => 'local', 41 | 'root' => storage_path('app/public'), 42 | 'url' => env('APP_URL').'/storage', 43 | 'visibility' => 'public', 44 | 'throw' => false, 45 | ], 46 | 47 | 's3' => [ 48 | 'driver' => 's3', 49 | 'key' => env('AWS_ACCESS_KEY_ID'), 50 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 51 | 'region' => env('AWS_DEFAULT_REGION'), 52 | 'bucket' => env('AWS_BUCKET'), 53 | 'url' => env('AWS_URL'), 54 | 'endpoint' => env('AWS_ENDPOINT'), 55 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 56 | 'throw' => false, 57 | ], 58 | 59 | ], 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Symbolic Links 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Here you may configure the symbolic links that will be created when the 67 | | `storage:link` Artisan command is executed. The array keys should be 68 | | the locations of the links and the values should be their targets. 69 | | 70 | */ 71 | 72 | 'links' => [ 73 | public_path('storage') => storage_path('app/public'), 74 | ], 75 | 76 | ]; 77 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 65536, 48 | 'threads' => 1, 49 | 'time' => 4, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Deprecations Log Channel 26 | |-------------------------------------------------------------------------- 27 | | 28 | | This option controls the log channel that should be used to log warnings 29 | | regarding deprecated PHP and library features. This allows you to get 30 | | your application ready for upcoming major versions of dependencies. 31 | | 32 | */ 33 | 34 | 'deprecations' => [ 35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 36 | 'trace' => false, 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Log Channels 42 | |-------------------------------------------------------------------------- 43 | | 44 | | Here you may configure the log channels for your application. Out of 45 | | the box, Laravel uses the Monolog PHP logging library. This gives 46 | | you a variety of powerful log handlers / formatters to utilize. 47 | | 48 | | Available Drivers: "single", "daily", "slack", "syslog", 49 | | "errorlog", "monolog", 50 | | "custom", "stack" 51 | | 52 | */ 53 | 54 | 'channels' => [ 55 | 'stack' => [ 56 | 'driver' => 'stack', 57 | 'channels' => ['single'], 58 | 'ignore_exceptions' => false, 59 | ], 60 | 61 | 'single' => [ 62 | 'driver' => 'single', 63 | 'path' => storage_path('logs/laravel.log'), 64 | 'level' => env('LOG_LEVEL', 'debug'), 65 | 'replace_placeholders' => true, 66 | ], 67 | 68 | 'daily' => [ 69 | 'driver' => 'daily', 70 | 'path' => storage_path('logs/laravel.log'), 71 | 'level' => env('LOG_LEVEL', 'debug'), 72 | 'days' => 14, 73 | 'replace_placeholders' => true, 74 | ], 75 | 76 | 'slack' => [ 77 | 'driver' => 'slack', 78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 79 | 'username' => 'Laravel Log', 80 | 'emoji' => ':boom:', 81 | 'level' => env('LOG_LEVEL', 'critical'), 82 | 'replace_placeholders' => true, 83 | ], 84 | 85 | 'papertrail' => [ 86 | 'driver' => 'monolog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 89 | 'handler_with' => [ 90 | 'host' => env('PAPERTRAIL_URL'), 91 | 'port' => env('PAPERTRAIL_PORT'), 92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 93 | ], 94 | 'processors' => [PsrLogMessageProcessor::class], 95 | ], 96 | 97 | 'stderr' => [ 98 | 'driver' => 'monolog', 99 | 'level' => env('LOG_LEVEL', 'debug'), 100 | 'handler' => StreamHandler::class, 101 | 'formatter' => env('LOG_STDERR_FORMATTER'), 102 | 'with' => [ 103 | 'stream' => 'php://stderr', 104 | ], 105 | 'processors' => [PsrLogMessageProcessor::class], 106 | ], 107 | 108 | 'syslog' => [ 109 | 'driver' => 'syslog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | 'facility' => LOG_USER, 112 | 'replace_placeholders' => true, 113 | ], 114 | 115 | 'errorlog' => [ 116 | 'driver' => 'errorlog', 117 | 'level' => env('LOG_LEVEL', 'debug'), 118 | 'replace_placeholders' => true, 119 | ], 120 | 121 | 'null' => [ 122 | 'driver' => 'monolog', 123 | 'handler' => NullHandler::class, 124 | ], 125 | 126 | 'emergency' => [ 127 | 'path' => storage_path('logs/laravel.log'), 128 | ], 129 | ], 130 | 131 | ]; 132 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", 32 | | "postmark", "log", "array", "failover" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'url' => env('MAIL_URL'), 40 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 41 | 'port' => env('MAIL_PORT', 587), 42 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 43 | 'username' => env('MAIL_USERNAME'), 44 | 'password' => env('MAIL_PASSWORD'), 45 | 'timeout' => null, 46 | 'local_domain' => env('MAIL_EHLO_DOMAIN'), 47 | ], 48 | 49 | 'ses' => [ 50 | 'transport' => 'ses', 51 | ], 52 | 53 | 'mailgun' => [ 54 | 'transport' => 'mailgun', 55 | // 'client' => [ 56 | // 'timeout' => 5, 57 | // ], 58 | ], 59 | 60 | 'postmark' => [ 61 | 'transport' => 'postmark', 62 | // 'client' => [ 63 | // 'timeout' => 5, 64 | // ], 65 | ], 66 | 67 | 'sendmail' => [ 68 | 'transport' => 'sendmail', 69 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 70 | ], 71 | 72 | 'log' => [ 73 | 'transport' => 'log', 74 | 'channel' => env('MAIL_LOG_CHANNEL'), 75 | ], 76 | 77 | 'array' => [ 78 | 'transport' => 'array', 79 | ], 80 | 81 | 'failover' => [ 82 | 'transport' => 'failover', 83 | 'mailers' => [ 84 | 'smtp', 85 | 'log', 86 | ], 87 | ], 88 | ], 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Global "From" Address 93 | |-------------------------------------------------------------------------- 94 | | 95 | | You may wish for all e-mails sent by your application to be sent from 96 | | the same address. Here, you may specify a name and address that is 97 | | used globally for all e-mails that are sent by your application. 98 | | 99 | */ 100 | 101 | 'from' => [ 102 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 103 | 'name' => env('MAIL_FROM_NAME', 'Example'), 104 | ], 105 | 106 | /* 107 | |-------------------------------------------------------------------------- 108 | | Markdown Mail Settings 109 | |-------------------------------------------------------------------------- 110 | | 111 | | If you are using Markdown based email rendering, you may configure your 112 | | theme and component paths here, allowing you to customize the design 113 | | of the emails. Or, you may simply stick with the Laravel defaults! 114 | | 115 | */ 116 | 117 | 'markdown' => [ 118 | 'theme' => 'default', 119 | 120 | 'paths' => [ 121 | resource_path('views/vendor/mail'), 122 | ], 123 | ], 124 | 125 | ]; 126 | -------------------------------------------------------------------------------- /config/permission.php: -------------------------------------------------------------------------------- 1 | [ 6 | 7 | /* 8 | * When using the "HasPermissions" trait from this package, we need to know which 9 | * Eloquent model should be used to retrieve your permissions. Of course, it 10 | * is often just the "Permission" model but you may use whatever you like. 11 | * 12 | * The model you want to use as a Permission model needs to implement the 13 | * `Spatie\Permission\Contracts\Permission` contract. 14 | */ 15 | 16 | 'permission' => Spatie\Permission\Models\Permission::class, 17 | 18 | /* 19 | * When using the "HasRoles" trait from this package, we need to know which 20 | * Eloquent model should be used to retrieve your roles. Of course, it 21 | * is often just the "Role" model but you may use whatever you like. 22 | * 23 | * The model you want to use as a Role model needs to implement the 24 | * `Spatie\Permission\Contracts\Role` contract. 25 | */ 26 | 27 | 'role' => Spatie\Permission\Models\Role::class, 28 | 29 | ], 30 | 31 | 'table_names' => [ 32 | 33 | /* 34 | * When using the "HasRoles" trait from this package, we need to know which 35 | * table should be used to retrieve your roles. We have chosen a basic 36 | * default value but you may easily change it to any table you like. 37 | */ 38 | 39 | 'roles' => 'roles', 40 | 41 | /* 42 | * When using the "HasPermissions" trait from this package, we need to know which 43 | * table should be used to retrieve your permissions. We have chosen a basic 44 | * default value but you may easily change it to any table you like. 45 | */ 46 | 47 | 'permissions' => 'permissions', 48 | 49 | /* 50 | * When using the "HasPermissions" trait from this package, we need to know which 51 | * table should be used to retrieve your models permissions. We have chosen a 52 | * basic default value but you may easily change it to any table you like. 53 | */ 54 | 55 | 'model_has_permissions' => 'model_has_permissions', 56 | 57 | /* 58 | * When using the "HasRoles" trait from this package, we need to know which 59 | * table should be used to retrieve your models roles. We have chosen a 60 | * basic default value but you may easily change it to any table you like. 61 | */ 62 | 63 | 'model_has_roles' => 'model_has_roles', 64 | 65 | /* 66 | * When using the "HasRoles" trait from this package, we need to know which 67 | * table should be used to retrieve your roles permissions. We have chosen a 68 | * basic default value but you may easily change it to any table you like. 69 | */ 70 | 71 | 'role_has_permissions' => 'role_has_permissions', 72 | ], 73 | 74 | 'column_names' => [ 75 | /* 76 | * Change this if you want to name the related pivots other than defaults 77 | */ 78 | 'role_pivot_key' => null, //default 'role_id', 79 | 'permission_pivot_key' => null, //default 'permission_id', 80 | 81 | /* 82 | * Change this if you want to name the related model primary key other than 83 | * `model_id`. 84 | * 85 | * For example, this would be nice if your primary keys are all UUIDs. In 86 | * that case, name this `model_uuid`. 87 | */ 88 | 89 | 'model_morph_key' => 'model_id', 90 | 91 | /* 92 | * Change this if you want to use the teams feature and your related model's 93 | * foreign key is other than `team_id`. 94 | */ 95 | 96 | 'team_foreign_key' => 'team_id', 97 | ], 98 | 99 | /* 100 | * When set to true, the method for checking permissions will be registered on the gate. 101 | * Set this to false, if you want to implement custom logic for checking permissions. 102 | */ 103 | 104 | 'register_permission_check_method' => true, 105 | 106 | /* 107 | * When set to true the package implements teams using the 'team_foreign_key'. If you want 108 | * the migrations to register the 'team_foreign_key', you must set this to true 109 | * before doing the migration. If you already did the migration then you must make a new 110 | * migration to also add 'team_foreign_key' to 'roles', 'model_has_roles', and 111 | * 'model_has_permissions'(view the latest version of package's migration file) 112 | */ 113 | 114 | 'teams' => false, 115 | 116 | /* 117 | * When set to true, the required permission names are added to the exception 118 | * message. This could be considered an information leak in some contexts, so 119 | * the default setting is false here for optimum safety. 120 | */ 121 | 122 | 'display_permission_in_exception' => false, 123 | 124 | /* 125 | * When set to true, the required role names are added to the exception 126 | * message. This could be considered an information leak in some contexts, so 127 | * the default setting is false here for optimum safety. 128 | */ 129 | 130 | 'display_role_in_exception' => false, 131 | 132 | /* 133 | * By default wildcard permission lookups are disabled. 134 | */ 135 | 136 | 'enable_wildcard_permission' => false, 137 | 138 | 'cache' => [ 139 | 140 | /* 141 | * By default all permissions are cached for 24 hours to speed up performance. 142 | * When permissions or roles are updated the cache is flushed automatically. 143 | */ 144 | 145 | 'expiration_time' => \DateInterval::createFromDateString('24 hours'), 146 | 147 | /* 148 | * The cache key used to store all permissions. 149 | */ 150 | 151 | 'key' => 'spatie.permission.cache', 152 | 153 | /* 154 | * You may optionally indicate a specific cache driver to use for permission and 155 | * role caching using any of the `store` drivers listed in the cache.php config 156 | * file. Using 'default' here means to use the `default` set in cache.php. 157 | */ 158 | 159 | 'store' => 'default', 160 | ], 161 | ]; 162 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Job Batching 79 | |-------------------------------------------------------------------------- 80 | | 81 | | The following options configure the database and table that store job 82 | | batching information. These options can be updated to any database 83 | | connection and table which has been defined by your application. 84 | | 85 | */ 86 | 87 | 'batching' => [ 88 | 'database' => env('DB_CONNECTION', 'mysql'), 89 | 'table' => 'job_batches', 90 | ], 91 | 92 | /* 93 | |-------------------------------------------------------------------------- 94 | | Failed Queue Jobs 95 | |-------------------------------------------------------------------------- 96 | | 97 | | These options configure the behavior of failed queue job logging so you 98 | | can control which database and table are used to store the jobs that 99 | | have failed. You may change them to any database / table you wish. 100 | | 101 | */ 102 | 103 | 'failed' => [ 104 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 105 | 'database' => env('DB_CONNECTION', 'mysql'), 106 | 'table' => 'failed_jobs', 107 | ], 108 | 109 | ]; 110 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 19 | '%s%s', 20 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 21 | Sanctum::currentApplicationUrlWithPort() 22 | ))), 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Sanctum Guards 27 | |-------------------------------------------------------------------------- 28 | | 29 | | This array contains the authentication guards that will be checked when 30 | | Sanctum is trying to authenticate a request. If none of these guards 31 | | are able to authenticate the request, Sanctum will use the bearer 32 | | token that's present on an incoming request for authentication. 33 | | 34 | */ 35 | 36 | 'guard' => ['web'], 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Expiration Minutes 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This value controls the number of minutes until an issued token will be 44 | | considered expired. If this value is null, personal access tokens do 45 | | not expire. This won't tweak the lifetime of first-party sessions. 46 | | 47 | */ 48 | 49 | 'expiration' => null, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Sanctum Middleware 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When authenticating your first-party SPA with Sanctum you may need to 57 | | customize some of the middleware Sanctum uses while processing the 58 | | request. You may change the middleware listed below as required. 59 | | 60 | */ 61 | 62 | 'middleware' => [ 63 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 64 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | 'scheme' => 'https', 22 | ], 23 | 24 | 'postmark' => [ 25 | 'token' => env('POSTMARK_TOKEN'), 26 | ], 27 | 28 | 'ses' => [ 29 | 'key' => env('AWS_ACCESS_KEY_ID'), 30 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 31 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class UserFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'name' => fake()->name(), 22 | 'email' => fake()->unique()->safeEmail(), 23 | 'email_verified_at' => now(), 24 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 25 | 'remember_token' => Str::random(10), 26 | ]; 27 | } 28 | 29 | /** 30 | * Indicate that the model's email address should be unverified. 31 | */ 32 | public function unverified(): static 33 | { 34 | return $this->state(fn (array $attributes) => [ 35 | 'email_verified_at' => null, 36 | ]); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('email')->unique(); 18 | $table->timestamp('email_verified_at')->nullable(); 19 | $table->string('password'); 20 | $table->integer('status')->default(1); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('users'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('email')->primary(); 16 | $table->string('token'); 17 | $table->timestamp('created_at')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('password_reset_tokens'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('uuid')->unique(); 17 | $table->text('connection'); 18 | $table->text('queue'); 19 | $table->longText('payload'); 20 | $table->longText('exception'); 21 | $table->timestamp('failed_at')->useCurrent(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('failed_jobs'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->morphs('tokenable'); 17 | $table->string('name'); 18 | $table->string('token', 64)->unique(); 19 | $table->text('abilities')->nullable(); 20 | $table->timestamp('last_used_at')->nullable(); 21 | $table->timestamp('expires_at')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('personal_access_tokens'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2023_06_20_033844_create_permission_tables.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); // permission id 30 | $table->string('name'); // For MySQL 8.0 use string('name', 125); 31 | $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); 32 | $table->timestamps(); 33 | 34 | $table->unique(['name', 'guard_name']); 35 | }); 36 | 37 | Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) { 38 | $table->bigIncrements('id'); // role id 39 | if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing 40 | $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); 41 | $table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index'); 42 | } 43 | $table->string('name'); // For MySQL 8.0 use string('name', 125); 44 | $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); 45 | $table->timestamps(); 46 | if ($teams || config('permission.testing')) { 47 | $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); 48 | } else { 49 | $table->unique(['name', 'guard_name']); 50 | } 51 | }); 52 | 53 | Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { 54 | $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); 55 | 56 | $table->string('model_type'); 57 | $table->unsignedBigInteger($columnNames['model_morph_key']); 58 | $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); 59 | 60 | $table->foreign(PermissionRegistrar::$pivotPermission) 61 | ->references('id') // permission id 62 | ->on($tableNames['permissions']) 63 | ->onDelete('cascade'); 64 | if ($teams) { 65 | $table->unsignedBigInteger($columnNames['team_foreign_key']); 66 | $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); 67 | 68 | $table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'], 69 | 'model_has_permissions_permission_model_type_primary'); 70 | } else { 71 | $table->primary([PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'], 72 | 'model_has_permissions_permission_model_type_primary'); 73 | } 74 | 75 | }); 76 | 77 | Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { 78 | $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); 79 | 80 | $table->string('model_type'); 81 | $table->unsignedBigInteger($columnNames['model_morph_key']); 82 | $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); 83 | 84 | $table->foreign(PermissionRegistrar::$pivotRole) 85 | ->references('id') // role id 86 | ->on($tableNames['roles']) 87 | ->onDelete('cascade'); 88 | if ($teams) { 89 | $table->unsignedBigInteger($columnNames['team_foreign_key']); 90 | $table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index'); 91 | 92 | $table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'], 93 | 'model_has_roles_role_model_type_primary'); 94 | } else { 95 | $table->primary([PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'], 96 | 'model_has_roles_role_model_type_primary'); 97 | } 98 | }); 99 | 100 | Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { 101 | $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); 102 | $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); 103 | 104 | $table->foreign(PermissionRegistrar::$pivotPermission) 105 | ->references('id') // permission id 106 | ->on($tableNames['permissions']) 107 | ->onDelete('cascade'); 108 | 109 | $table->foreign(PermissionRegistrar::$pivotRole) 110 | ->references('id') // role id 111 | ->on($tableNames['roles']) 112 | ->onDelete('cascade'); 113 | 114 | $table->primary([PermissionRegistrar::$pivotPermission, PermissionRegistrar::$pivotRole], 'role_has_permissions_permission_id_role_id_primary'); 115 | }); 116 | 117 | app('cache') 118 | ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) 119 | ->forget(config('permission.cache.key')); 120 | } 121 | 122 | /** 123 | * Reverse the migrations. 124 | * 125 | * @return void 126 | */ 127 | public function down() 128 | { 129 | $tableNames = config('permission.table_names'); 130 | 131 | if (empty($tableNames)) { 132 | throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); 133 | } 134 | 135 | Schema::drop($tableNames['role_has_permissions']); 136 | Schema::drop($tableNames['model_has_roles']); 137 | Schema::drop($tableNames['model_has_permissions']); 138 | Schema::drop($tableNames['roles']); 139 | Schema::drop($tableNames['permissions']); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | // \App\Models\User::factory()->create([ 18 | // 'name' => 'Test User', 19 | // 'email' => 'test@example.com', 20 | // ]); 21 | 22 | $this->call(PermissionsTableSeeder::class); 23 | $this->call(UsersTableSeeder::class); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeders/PermissionsTableSeeder.php: -------------------------------------------------------------------------------- 1 | $permission]); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/seeders/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Mr Admin', 21 | 'email' => 'admin@demo.com', 22 | 'password' => Hash::make(12345678), 23 | // 'status' => 1, 24 | 'created_at' => now(), 25 | 'updated_at' => now(), 26 | ]); 27 | 28 | $role = Role::create(['name' => 'Admin']); 29 | $permissions = Permission::pluck('id','id')->all(); 30 | 31 | $role->syncPermissions($permissions); 32 | 33 | $user->assignRole([$role->id]); 34 | 35 | Role::create(['name' => 'Staff']); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build" 7 | }, 8 | "devDependencies": { 9 | "@popperjs/core": "^2.11.6", 10 | "axios": "^1.1.2", 11 | "bootstrap": "^5.3.2", 12 | "laravel-vite-plugin": "^0.7.5", 13 | "sass": "^1.56.1", 14 | "vite": "^4.0.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/css/custom.css: -------------------------------------------------------------------------------- 1 | .btn-toggle-nav a { 2 | padding: .1875rem .5rem; 3 | margin-top: .125rem; 4 | margin-left: 1.25rem; 5 | } 6 | .btn-toggle[aria-expanded="true"]::after { 7 | transform: rotate(90deg); 8 | } 9 | .btn-toggle::after { 10 | width: 1.25em; 11 | line-height: 0; 12 | content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); 13 | transition: transform .35s ease; 14 | transform-origin: .5em 50%; 15 | } 16 | .sidebar li .submenu{ 17 | list-style: none; 18 | margin: 0; 19 | padding: 0; 20 | padding-left: 1rem; 21 | padding-right: 1rem; 22 | } 23 | 24 | .sidebar .nav-link { 25 | font-weight: 500; 26 | color: var(--bs-dark); 27 | } 28 | .sidebar .nav-link:hover { 29 | color: var(--bs-primary); 30 | } 31 | 32 | .accordion-item { 33 | background: transparent; 34 | border: none; 35 | } 36 | 37 | .accordion-button { 38 | position: relative; 39 | display: flex; 40 | align-items: center; 41 | width: 100%; 42 | padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); 43 | font-size: .9rem; 44 | color: var(--bs-accordion-btn-color); 45 | text-align: left; 46 | background: transparent !important; 47 | border: 0; 48 | border-radius: 0; 49 | overflow-anchor: none; 50 | transition: var(--bs-accordion-transition); 51 | } 52 | 53 | .accordion-button:not(.collapsed) { 54 | color: var(--bs-accordion-active-color); 55 | background: transparent !important; 56 | box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); 57 | } 58 | .accordion-collapse ul { 59 | padding-left: 1rem; 60 | } 61 | /*.select2-container--open .select2-dropdown--below{ 62 | width: 466px; 63 | z-index: 99999999999; 64 | }*/ 65 | .modal-open .select2-dropdown { 66 | z-index: 10060; 67 | } 68 | 69 | .modal-open .select2-close-mask { 70 | z-index: 10055; 71 | } 72 | .modal-open .select2-search--dropdown .select2-search__field { 73 | z-index: 10055; 74 | } 75 | .accordion, .accordion-button, .accordion-button:not(.collapsed), .sidebar .nav-link, .accordion-item{ 76 | color: #8391a2; 77 | } 78 | .accordion, .accordion-button:hover, .sidebar .nav-link:hover, .accordion-item:hover{ 79 | color: #bccee4; 80 | } 81 | .accordion, .accordion-button .active, .sidebar .nav-link.active, .accordion-item .active{ 82 | color: #ffffff; 83 | } 84 | .footer { 85 | position: absolute; 86 | right: 0; 87 | /* bottom: 0; */ 88 | left: 0; 89 | height: 60px; 90 | display: -webkit-box; 91 | display: -ms-flexbox; 92 | display: flex; 93 | -webkit-box-align: center; 94 | -ms-flex-align: center; 95 | align-items: center; 96 | padding: 0 1.5rem; 97 | margin-top: 2rem; 98 | color: rgba(108, 117, 125, 0.75); 99 | -webkit-transition: all .25s ease-in-out; 100 | transition: all .25s ease-in-out; 101 | border-top: 1px solid #dee2e6; 102 | } 103 | .invalid-feedback{ 104 | display: block; 105 | } 106 | .btn-bd-primary { 107 | --bd-violet-bg: #712cf9; 108 | --bd-violet-rgb: 112.520718, 44.062154, 249.437846; 109 | 110 | --bs-btn-font-weight: 600; 111 | --bs-btn-color: var(--bs-white); 112 | --bs-btn-bg: var(--bd-violet-bg); 113 | --bs-btn-border-color: var(--bd-violet-bg); 114 | --bs-btn-hover-color: var(--bs-white); 115 | --bs-btn-hover-bg: #6528e0; 116 | --bs-btn-hover-border-color: #6528e0; 117 | --bs-btn-focus-shadow-rgb: var(--bd-violet-rgb); 118 | --bs-btn-active-color: var(--bs-btn-hover-color); 119 | --bs-btn-active-bg: #5a23c8; 120 | --bs-btn-active-border-color: #5a23c8; 121 | } 122 | 123 | .bd-mode-toggle { 124 | z-index: 1500; 125 | } 126 | 127 | .bd-mode-toggle .dropdown-menu .active .bi { 128 | display: block !important; 129 | } 130 | 131 | 132 | .custom-control.teleport-switch { 133 | --color: #4cd964; 134 | padding-left: 0; 135 | } 136 | 137 | .custom-control.teleport-switch .teleport-switch-control-input { 138 | display: none; 139 | } 140 | 141 | .custom-control.teleport-switch .teleport-switch-control-input:checked ~ .teleport-switch-control-indicator { 142 | border-color: var(--color); 143 | } 144 | 145 | .custom-control.teleport-switch .teleport-switch-control-input:checked ~ .teleport-switch-control-indicator::after { 146 | left: -14px; 147 | } 148 | 149 | .custom-control.teleport-switch .teleport-switch-control-input:checked ~ .teleport-switch-control-indicator::before { 150 | right: 2px; 151 | background-color: var(--color); 152 | } 153 | 154 | .custom-control.teleport-switch .teleport-switch-control-input:disabled ~ .teleport-switch-control-indicator { 155 | opacity: .4; 156 | } 157 | 158 | .custom-control.teleport-switch .teleport-switch-control-indicator { 159 | display: inline-block; 160 | position: relative; 161 | margin: 0 10px; 162 | top: 4px; 163 | width: 32px; 164 | height: 20px; 165 | background: #fff; 166 | border-radius: 16px; 167 | -webkit-transition: .3s; 168 | -o-transition: .3s; 169 | transition: .3s; 170 | border: 2px solid #ccc; 171 | overflow: hidden; 172 | } 173 | 174 | .custom-control.teleport-switch .teleport-switch-control-indicator::after { 175 | content: ''; 176 | display: block; 177 | position: absolute; 178 | width: 12px; 179 | height: 12px; 180 | border-radius: 50%; 181 | -webkit-transition: .3s; 182 | -o-transition: .3s; 183 | transition: .3s; 184 | top: 2px; 185 | left: 2px; 186 | background: #ccc; 187 | } 188 | 189 | .custom-control.teleport-switch .teleport-switch-control-indicator::before { 190 | content: ''; 191 | display: block; 192 | position: absolute; 193 | width: 12px; 194 | height: 12px; 195 | border-radius: 50%; 196 | -webkit-transition: .3s; 197 | -o-transition: .3s; 198 | transition: .3s; 199 | top: 2px; 200 | right: -14px; 201 | background: #ccc; 202 | } 203 | 204 | .required label:after { 205 | content: " *"; 206 | color: #FF0000FF; 207 | } 208 | 209 | .outline-0 { 210 | outline: none; 211 | } 212 | 213 | .left-bg{ 214 | background: linear-gradient(45deg, #555E65 0%, #585F65 100%) !important; 215 | } 216 | -------------------------------------------------------------------------------- /public/css/dashboard.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: .875rem; 3 | } 4 | 5 | .feather { 6 | width: 16px; 7 | height: 16px; 8 | } 9 | 10 | .bi { 11 | display: inline; 12 | width: 1rem; 13 | height: 1rem; 14 | } 15 | 16 | /* 17 | * Sidebar 18 | */ 19 | 20 | @media (min-width: 768px) { 21 | .sidebar .offcanvas-lg { 22 | position: -webkit-sticky; 23 | position: sticky; 24 | top: 48px; 25 | } 26 | .navbar-search { 27 | display: block; 28 | } 29 | } 30 | 31 | .sidebar .nav-link { 32 | font-size: .875rem; 33 | font-weight: 500; 34 | } 35 | 36 | .sidebar-heading { 37 | font-size: .75rem; 38 | } 39 | 40 | /* 41 | * Navbar 42 | */ 43 | 44 | .navbar-brand { 45 | padding-top: .75rem; 46 | padding-bottom: .75rem; 47 | background-color: rgba(0, 0, 0, .25); 48 | box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); 49 | } 50 | 51 | .navbar .form-control { 52 | padding: .75rem 1rem; 53 | } 54 | /* 55 | * Sidebar 56 | */ 57 | 58 | .sidebar-sticky { 59 | height: calc(100vh - 48px); 60 | overflow-x: hidden; 61 | overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ 62 | } 63 | 64 | .sidebar .nav-link { 65 | font-weight: 500; 66 | color: #333; 67 | } 68 | 69 | .sidebar .nav-link .feather { 70 | margin-right: 4px; 71 | color: #727272; 72 | } 73 | 74 | .sidebar .nav-link.active { 75 | background-color: #4fc9da; 76 | color: #fff; 77 | } 78 | 79 | .sidebar .nav-link { 80 | font-weight: 500; 81 | color: #716d66; 82 | } 83 | 84 | 85 | .sidebar .nav-link:hover .feather, 86 | .sidebar .nav-link.active .feather { 87 | color: inherit; 88 | } 89 | 90 | .sidebar-heading { 91 | font-size: .75rem; 92 | } 93 | 94 | .sidebar .accordion-button.active { 95 | background-color: #4fc9da !important; 96 | color: #fff; 97 | } 98 | 99 | /* 100 | * Navbar 101 | */ 102 | 103 | .navbar-brand { 104 | padding-top: .75rem; 105 | padding-bottom: .75rem; 106 | background-color: #202c46; 107 | color: darkslategrey; 108 | box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); 109 | } 110 | 111 | .navbar .navbar-toggler { 112 | top: .25rem; 113 | right: 1rem; 114 | } 115 | 116 | .navbar .form-control { 117 | padding: .75rem 1rem; 118 | } 119 | 120 | .form-control-dark { 121 | color: #fff; 122 | background-color: rgba(255, 255, 255, .1); 123 | border-color: rgba(255, 255, 255, .1); 124 | } 125 | 126 | .form-control-dark:focus { 127 | border-color: transparent; 128 | box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); 129 | } 130 | 131 | /*custom style*/ 132 | .bd-placeholder-img { 133 | font-size: 1.125rem; 134 | text-anchor: middle; 135 | -webkit-user-select: none; 136 | -moz-user-select: none; 137 | user-select: none; 138 | } 139 | 140 | .b-example-divider { 141 | height: 3rem; 142 | background-color: rgba(0, 0, 0, .1); 143 | border: solid rgba(0, 0, 0, .15); 144 | border-width: 1px 0; 145 | box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); 146 | } 147 | 148 | .b-example-vr { 149 | flex-shrink: 0; 150 | width: 1.5rem; 151 | height: 100vh; 152 | } 153 | 154 | .bi { 155 | vertical-align: -.125em; 156 | fill: currentColor; 157 | } 158 | 159 | .nav-scroller { 160 | position: relative; 161 | z-index: 2; 162 | height: 2.75rem; 163 | overflow-y: hidden; 164 | } 165 | 166 | .nav-scroller .nav { 167 | display: flex; 168 | flex-wrap: nowrap; 169 | padding-bottom: 1rem; 170 | margin-top: -1px; 171 | overflow-x: auto; 172 | text-align: center; 173 | white-space: nowrap; 174 | -webkit-overflow-scrolling: touch; 175 | } 176 | 177 | a { 178 | text-decoration: none !important; 179 | } 180 | 181 | main .card { 182 | border: none; 183 | box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important; 184 | } 185 | 186 | .dropdown-menu[data-bs-popper] { 187 | left: auto; 188 | right: 0; 189 | margin-top: var(--bs-dropdown-spacer); 190 | top: 100%; 191 | } 192 | 193 | .illustration { 194 | background: #e0eafc; 195 | color: #3f80ea; 196 | } 197 | 198 | .illustration-img { 199 | max-width: 150px; 200 | width: 100%; 201 | } 202 | 203 | .select2-container--default.select2-container--focus .select2-selection--multiple { 204 | border: solid #ddd 1px; 205 | } 206 | 207 | table tr th, td { 208 | background: transparent !important; 209 | } 210 | 211 | 212 | /*new dashboard*/ 213 | .accordion { 214 | --bs-accordion-btn-icon: url( 215 | "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); 216 | --bs-accordion-btn-active-icon: url( 217 | "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); 218 | } 219 | 220 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irabbi360/laravel-admin-starter/55bdc905aaba2be594d78fc0fe564dea2156cdd2/public/favicon.ico -------------------------------------------------------------------------------- /public/images/admin/customer-support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irabbi360/laravel-admin-starter/55bdc905aaba2be594d78fc0fe564dea2156cdd2/public/images/admin/customer-support.png -------------------------------------------------------------------------------- /public/images/placeholder-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irabbi360/laravel-admin-starter/55bdc905aaba2be594d78fc0fe564dea2156cdd2/public/images/placeholder-post.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Request::capture() 53 | )->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/js/color-modes.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Color mode toggler for Bootstrap's docs (https://getbootstrap.com/) 3 | * Copyright 2011-2023 The Bootstrap Authors 4 | * Licensed under the Creative Commons Attribution 3.0 Unported License. 5 | */ 6 | 7 | (() => { 8 | 'use strict' 9 | 10 | const getStoredTheme = () => localStorage.getItem('theme') 11 | const setStoredTheme = theme => localStorage.setItem('theme', theme) 12 | 13 | const getPreferredTheme = () => { 14 | const storedTheme = getStoredTheme() 15 | if (storedTheme) { 16 | return storedTheme 17 | } 18 | 19 | return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' 20 | } 21 | 22 | const setTheme = theme => { 23 | if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) { 24 | document.documentElement.setAttribute('data-bs-theme', 'dark') 25 | } else { 26 | document.documentElement.setAttribute('data-bs-theme', theme) 27 | } 28 | } 29 | 30 | setTheme(getPreferredTheme()) 31 | 32 | const showActiveTheme = (theme, focus = false) => { 33 | const themeSwitcher = document.querySelector('#bd-theme') 34 | 35 | if (!themeSwitcher) { 36 | return 37 | } 38 | 39 | const themeSwitcherText = document.querySelector('#bd-theme-text') 40 | const activeThemeIcon = document.querySelector('.theme-icon-active use') 41 | const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`) 42 | const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href') 43 | 44 | document.querySelectorAll('[data-bs-theme-value]').forEach(element => { 45 | element.classList.remove('active') 46 | element.setAttribute('aria-pressed', 'false') 47 | }) 48 | 49 | btnToActive.classList.add('active') 50 | btnToActive.setAttribute('aria-pressed', 'true') 51 | activeThemeIcon.setAttribute('href', svgOfActiveBtn) 52 | const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})` 53 | themeSwitcher.setAttribute('aria-label', themeSwitcherLabel) 54 | 55 | if (focus) { 56 | themeSwitcher.focus() 57 | } 58 | } 59 | 60 | window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => { 61 | const storedTheme = getStoredTheme() 62 | if (storedTheme !== 'light' && storedTheme !== 'dark') { 63 | setTheme(getPreferredTheme()) 64 | } 65 | }) 66 | 67 | window.addEventListener('DOMContentLoaded', () => { 68 | showActiveTheme(getPreferredTheme()) 69 | 70 | document.querySelectorAll('[data-bs-theme-value]') 71 | .forEach(toggle => { 72 | toggle.addEventListener('click', () => { 73 | const theme = toggle.getAttribute('data-bs-theme-value') 74 | setStoredTheme(theme) 75 | setTheme(theme) 76 | showActiveTheme(theme, true) 77 | }) 78 | }) 79 | }) 80 | })() 81 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/vendor/flasher/flasher.min.css: -------------------------------------------------------------------------------- 1 | .fl-main-container{position:fixed;transition:all 1s ease-in-out;width:24em;z-index:99999}@media only screen and (max-width:480px){.fl-main-container{left:.5em;right:.5em;width:auto}}.fl-main-container[data-position^=top-]{top:.5em}.fl-main-container[data-position^=bottom-]{bottom:.5em}.fl-main-container[data-position$=-right]{right:.5em}.fl-main-container[data-position$=-right] .fl-container{transform:translateX(110%)}.fl-main-container[data-position$=-left]{left:.5em}.fl-main-container[data-position$=-left] .fl-container{transform:translateX(-110%)}.fl-main-container[data-position$=-center]{left:50%;transform:translateX(-50%)}.fl-main-container[data-position=top-center] .fl-container{transform:translateY(-100vh)}.fl-main-container[data-position=bottom-center] .fl-container{transform:translateY(100vh)}.fl-main-container .fl-container{transition:transform .3s ease-in-out}.fl-main-container .fl-container.fl-show{transform:translate(0)}.fl-main-container .fl-container .fl-progress-bar{display:flex;height:.125em;margin-left:-1px}.fl-main-container .fl-container.fl-rtl{direction:rtl}.fl-main-container .fl-container.fl-rtl .fl-progress-bar{margin-left:auto;margin-right:-1px}.fl-main-container .fl-container.fl-success .fl-icon{background-color:#059669}.fl-main-container .fl-container.fl-success .fl-progress-bar{background-color:#6dface}.fl-main-container .fl-container.fl-success .fl-progress-bar .fl-progress{background-color:#059669}.fl-main-container .fl-container.fl-flasher.fl-success{border-left:.8em solid #059669}.fl-main-container .fl-container.fl-flasher.fl-success.fl-rtl{border-left:none;border-right:.8em solid #059669}.fl-main-container .fl-container.fl-flasher.fl-success:not(.fl-rtl){border-left:.8em solid #059669;border-right:none}.fl-main-container .fl-container.fl-flasher.fl-success .fl-title{color:#059669}.fl-main-container .fl-container.fl-info .fl-icon{background-color:#2563eb}.fl-main-container .fl-container.fl-info .fl-progress-bar{background-color:#e0e9fc}.fl-main-container .fl-container.fl-info .fl-progress-bar .fl-progress{background-color:#2563eb}.fl-main-container .fl-container.fl-flasher.fl-info{border-left:.8em solid #2563eb}.fl-main-container .fl-container.fl-flasher.fl-info.fl-rtl{border-left:none;border-right:.8em solid #2563eb}.fl-main-container .fl-container.fl-flasher.fl-info:not(.fl-rtl){border-left:.8em solid #2563eb;border-right:none}.fl-main-container .fl-container.fl-flasher.fl-info .fl-title{color:#2563eb}.fl-main-container .fl-container.fl-warning .fl-icon{background-color:#d97706}.fl-main-container .fl-container.fl-warning .fl-progress-bar{background-color:#fdd8ae}.fl-main-container .fl-container.fl-warning .fl-progress-bar .fl-progress{background-color:#d97706}.fl-main-container .fl-container.fl-flasher.fl-warning{border-left:.8em solid #d97706}.fl-main-container .fl-container.fl-flasher.fl-warning.fl-rtl{border-left:none;border-right:.8em solid #d97706}.fl-main-container .fl-container.fl-flasher.fl-warning:not(.fl-rtl){border-left:.8em solid #d97706;border-right:none}.fl-main-container .fl-container.fl-flasher.fl-warning .fl-title{color:#d97706}.fl-main-container .fl-container.fl-error .fl-icon{background-color:#dc2626}.fl-main-container .fl-container.fl-error .fl-progress-bar{background-color:#f8d6d6}.fl-main-container .fl-container.fl-error .fl-progress-bar .fl-progress{background-color:#dc2626}.fl-main-container .fl-container.fl-flasher.fl-error{border-left:.8em solid #dc2626}.fl-main-container .fl-container.fl-flasher.fl-error.fl-rtl{border-left:none;border-right:.8em solid #dc2626}.fl-main-container .fl-container.fl-flasher.fl-error:not(.fl-rtl){border-left:.8em solid #dc2626;border-right:none}.fl-main-container .fl-container.fl-flasher.fl-error .fl-title{color:#dc2626}.fl-main-container .fl-container .fl-icon{border-radius:50%;box-sizing:border-box;color:#fff;display:inline-block;height:1em;margin:0;min-height:1em;min-width:1em;position:relative;transition:all 1s;width:1em}.fl-main-container .fl-container .fl-icon:after,.fl-main-container .fl-container .fl-icon:before{border-width:0;box-sizing:border-box;content:"";position:absolute;transition:all 1s}.fl-main-container .fl-container.fl-success .fl-icon:after,.fl-main-container .fl-container.fl-success .fl-icon:before{background-color:currentColor;border-radius:.1em;height:.6em;left:.35em;top:.6em;transform:rotate(-135deg);transform-origin:.08em .08em;width:.16em}.fl-main-container .fl-container.fl-success .fl-icon:after{height:.16em;width:.4em}.fl-main-container .fl-container.fl-info .fl-icon:after,.fl-main-container .fl-container.fl-info .fl-icon:before{background-color:currentColor;border-radius:.03em;left:50%;transform:translateX(-50%);width:.15em}.fl-main-container .fl-container.fl-info .fl-icon:before{height:.38em;top:.4em}.fl-main-container .fl-container.fl-info .fl-icon:after{box-shadow:-.06em .19em,-.06em .44em,.06em .44em;height:.13em;top:.21em}.fl-main-container .fl-container.fl-warning .fl-icon:after,.fl-main-container .fl-container.fl-warning .fl-icon:before{background-color:currentColor;border-radius:.03em;left:50%;transform:translateX(-50%);width:.15em}.fl-main-container .fl-container.fl-warning .fl-icon:before{height:.38em;top:.21em}.fl-main-container .fl-container.fl-warning .fl-icon:after{height:.13em;top:.65em}.fl-main-container .fl-container.fl-error .fl-icon:after,.fl-main-container .fl-container.fl-error .fl-icon:before{background-color:currentColor;border-radius:.1em;height:.7em;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-135deg);width:.16em}.fl-main-container .fl-container.fl-error .fl-icon:after{transform:translate(-50%,-50%) rotate(-45deg)}.fl-main-container .fl-container.fl-flasher{background-color:#fff;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);color:#4b5563;cursor:pointer;line-height:1.5;margin-top:.5em;word-break:break-word}.fl-main-container .fl-container.fl-flasher.fl-rtl{border-radius:0 .375em .375em 0}.fl-main-container .fl-container.fl-flasher:not(.fl-rtl){border-radius:.375em 0 0 .375em}.fl-main-container .fl-container.fl-flasher .fl-content{align-items:center;display:flex;padding:.75em}.fl-main-container .fl-container.fl-flasher .fl-icon{font-size:2.5em}.fl-main-container .fl-container.fl-flasher .fl-message,.fl-main-container .fl-container.fl-flasher .fl-title{display:block;line-height:1.25em;margin-left:1em;margin-right:1em}.fl-main-container .fl-container.fl-flasher .fl-message:first-letter,.fl-main-container .fl-container.fl-flasher .fl-title:first-letter{text-transform:uppercase}.fl-main-container .fl-container.fl-flasher .fl-title{font-size:1em;font-weight:700}.fl-main-container .fl-container.fl-flasher .fl-message{font-size:.875em;margin-top:.25em} -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irabbi360/laravel-admin-starter/55bdc905aaba2be594d78fc0fe564dea2156cdd2/resources/css/app.css -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import 'bootstrap'; 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | import axios from 'axios'; 10 | window.axios = axios; 11 | 12 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 13 | 14 | /** 15 | * Echo exposes an expressive API for subscribing to channels and listening 16 | * for events that are broadcast by Laravel. Echo and event broadcasting 17 | * allows your team to easily build robust real-time web applications. 18 | */ 19 | 20 | // import Echo from 'laravel-echo'; 21 | 22 | // import Pusher from 'pusher-js'; 23 | // window.Pusher = Pusher; 24 | 25 | // window.Echo = new Echo({ 26 | // broadcaster: 'pusher', 27 | // key: import.meta.env.VITE_PUSHER_APP_KEY, 28 | // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, 29 | // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, 30 | // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, 31 | // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', 32 | // enabledTransports: ['ws', 'wss'], 33 | // }); 34 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.bunny.net/css?family=Nunito'); 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import 'bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /resources/views/admin/includes/breadcrumb.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{ Breadcrumbs::render() }} 4 | {{--
5 |
6 | 7 | 8 |
9 | 13 |
--}} 14 |
15 | -------------------------------------------------------------------------------- /resources/views/admin/includes/flash.blade.php: -------------------------------------------------------------------------------- 1 | @if(session('message')) 2 | 5 | @endif 6 | @if(session('error')) 7 | 10 | @endif 11 | -------------------------------------------------------------------------------- /resources/views/admin/includes/footer.blade.php: -------------------------------------------------------------------------------- 1 |
2 | Copyright © 2014-2019 AdminLTE.io. 3 | All rights reserved. 4 |
5 | Version 3.0.4 6 |
7 |
8 | -------------------------------------------------------------------------------- /resources/views/admin/includes/navbar.blade.php: -------------------------------------------------------------------------------- 1 | 46 | -------------------------------------------------------------------------------- /resources/views/admin/includes/sidebar.blade.php: -------------------------------------------------------------------------------- 1 | 107 | -------------------------------------------------------------------------------- /resources/views/admin/permissions/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 | 4 |
5 |
6 | Create Permission 7 |
8 |
9 | @csrf 10 |
11 |
12 | 13 | 15 | @error('name') 16 | 17 | {{ $message }} 18 | 19 | @enderror 20 |
21 |
22 | 28 |
29 |
30 | @endsection 31 | 32 | -------------------------------------------------------------------------------- /resources/views/admin/permissions/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 | 4 |
5 |
6 | Edit Permission 7 |
8 |
id]) }}" method="POST"> 9 | @csrf 10 | @method('PUT') 11 |
12 |
13 | 14 | 16 | @error('name')) 17 | 18 | {{ $message }} 19 | 20 | @enderror 21 |
22 |
23 | 29 |
30 |
31 | @endsection 32 | 33 | -------------------------------------------------------------------------------- /resources/views/admin/permissions/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 |
4 |
5 |
6 | Permission List 7 |
8 | @can('permission_create') 9 | 14 | @endcan 15 |
16 | 17 |
18 |
19 | 20 | 21 | 22 | 23 | 26 | 29 | 32 | 33 | 34 | 35 | @foreach($permissions as $key => $permission) 36 | 37 | 40 | 43 | 46 | 71 | 72 | 73 | @endforeach 74 | 75 |
24 | ID 25 | 27 | Title 28 | 30 | Action 31 |
38 | 39 | 41 | {{ $permission->id ?? '' }} 42 | 44 | {{ $permission->name ?? '' }} 45 | 47 | @can('permission_edit') 48 | 50 | Edit 51 | 52 | @endcan 53 | 54 | @can('permission_delete') 55 | 61 | Delete 67 | 68 | @endcan 69 | 70 |
76 |
77 |
78 |
79 | @endsection 80 | -------------------------------------------------------------------------------- /resources/views/admin/profile/change-password.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 | 4 |
5 |
6 | Edit Profile 7 |
8 | 9 |
10 |
11 | @csrf 12 | @method('PUT') 13 |
14 | 15 | 16 | @error('old_password') 17 | 18 | {{ $message }} 19 | 20 | @enderror 21 |
22 |
23 | 24 | 25 | @error('new_password') 26 | 27 | {{ $message }} 28 | 29 | @enderror 30 |
31 |
32 | 33 | 34 |
35 |
36 | 37 |
38 |
39 |
40 |
41 | @endsection 42 | 43 | -------------------------------------------------------------------------------- /resources/views/admin/profile/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 | 4 |
5 |
6 | Edit Profile 7 |
8 | 9 |
10 |
11 | @csrf 12 | @method('PUT') 13 |
14 | 15 | 16 | @error('name') 17 | 18 | {{ $message }} 19 | 20 | @enderror 21 |
22 |
23 | 24 | 25 | @error('email') 26 | 27 | {{ $message }} 28 | 29 | @enderror 30 |
31 |
32 | 33 |
34 |
35 |
36 |
37 | @endsection 38 | 39 | -------------------------------------------------------------------------------- /resources/views/admin/roles/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('styles') 4 | 5 | @endsection 6 | 7 | @section('content') 8 | 9 |
10 |
11 | Create Role 12 |
13 |
14 | @csrf 15 |
16 |
17 | 18 | 20 | @error('name')) 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 30 | 38 | @error('permissions')) 39 | 40 | {{ $message }} 41 | 42 | @enderror 43 |
44 |
45 | 51 |
52 |
53 | @endsection 54 | 55 | @section('scripts') 56 | 57 | 58 | 59 | 77 | 78 | @endsection 79 | -------------------------------------------------------------------------------- /resources/views/admin/roles/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('styles') 4 | 5 | @endsection 6 | 7 | @section('content') 8 |
9 |
10 | Edit Role 11 |
12 |
id]) }}" method="POST"> 13 | @csrf 14 | @method('PUT') 15 |
16 |
17 | 18 | 20 | @error('name') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 30 | 38 | @error('permissions')) 39 | 40 | {{ $message }} 41 | 42 | @enderror 43 |
44 |
45 | 51 |
52 |
53 | @endsection 54 | 55 | 56 | @section('scripts') 57 | 58 | 59 | 60 | 79 | 80 | @endsection 81 | -------------------------------------------------------------------------------- /resources/views/admin/roles/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 | 4 |
5 |
6 | Role List 7 | @can('role_create') 8 | 9 | Add New 10 | 11 | @endcan 12 |
13 | 14 |
15 |
16 | 17 | 18 | 19 | 22 | 25 | 28 | 31 | 32 | 33 | 34 | @foreach($roles as $key => $role) 35 | 36 | 39 | 42 | 47 | 76 | 77 | 78 | @endforeach 79 | 80 |
20 | ID 21 | 23 | Title 24 | 26 | Permissions 27 | 29 | Action 30 |
37 | {{ $role->id ?? '' }} 38 | 40 | {{ $role->name ?? '' }} 41 | 43 | @foreach($role->permissions as $key => $item) 44 | {{ $item->name }} 45 | @endforeach 46 | 48 | @can('role_show') 49 | 50 | View 51 | 52 | @endcan 53 | 54 | @can('role_edit') 55 | 56 | Edit 57 | 58 | @endcan 59 | 60 | @can('role_delete') 61 | Delete 67 | 68 | 73 | @endcan 74 | 75 |
81 |
82 |
83 | 86 |
87 | @endsection 88 | -------------------------------------------------------------------------------- /resources/views/admin/users/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 | 4 |
5 |
6 | Create User 7 |
8 |
9 | @csrf 10 |
11 |
12 | 13 | 15 | @error('name') 16 | 17 | {{ $message }} 18 | 19 | @enderror 20 |
21 |
22 | 23 | 25 | @error('email') 26 | 27 | {{ $message }} 28 | 29 | @enderror 30 |
31 |
32 | 33 | 35 | @error('password') 36 | 37 | {{ $message }} 38 | 39 | @enderror 40 |
41 |
42 | 48 |
49 |
50 | @endsection 51 | 52 | -------------------------------------------------------------------------------- /resources/views/admin/users/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('content') 4 |
5 |
6 |
7 | User List 8 |
9 | @can('permission_create') 10 | 15 | @endcan 16 |
17 |
18 |
19 | 20 | 21 | 22 | 25 | 28 | 31 | 34 | 37 | 40 | 43 | 44 | 45 | 46 | @foreach($users as $key => $user) 47 | 48 | 51 | 54 | 57 | 62 | 69 | 72 | 81 | 82 | @endforeach 83 | 84 |
23 | ID 24 | 26 | Name 27 | 29 | Email 30 | 32 | Roles 33 | 35 | Status 36 | 38 | Register At 39 | 41 | Action 42 |
49 | {{ $user->id ?? '' }} 50 | 52 | {{ $user->name ?? '' }} 53 | 55 | {{ $user->email ?? '' }} 56 | 58 | @foreach($user->getRoleNames() as $key => $item) 59 | {{ $item }} 60 | @endforeach 61 | 63 | @if($user->status) 64 | Active 65 | @else 66 | Blocked 67 | @endif 68 | 70 | {{ $user->created_at->format('Y-m-d') ?? '' }} 71 | 73 | @if (auth()->user()->hasRole('Admin')) 74 | @if($user->status) 75 | Block 76 | @else 77 | Unblock 78 | @endif 79 | @endif 80 |
85 |
86 |
87 | 90 |
91 | @endsection 92 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Login') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('email') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('password') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 59 | 60 | @if (Route::has('password.request')) 61 | 62 | {{ __('Forgot Your Password?') }} 63 | 64 | @endif 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | @endsection 74 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 | {{ __('Please confirm your password before continuing.') }} 12 | 13 |
14 | @csrf 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('password') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | @if (Route::has('password.request')) 37 | 38 | {{ __('Forgot Your Password?') }} 39 | 40 | @endif 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('email') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @error('password') 37 | 38 | {{ $message }} 39 | 40 | @enderror 41 |
42 |
43 | 44 |
45 | 46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | @endsection 66 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Register') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('name') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('email') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @error('password') 49 | 50 | {{ $message }} 51 | 52 | @enderror 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Dashboard') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 | {{ __('You are logged in!') }} 18 |
19 |
20 |
21 |
22 |
23 | @endsection 24 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ config('app.name', 'Laravel') }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | @vite(['resources/sass/app.scss', 'resources/js/app.js']) 18 | 19 | 20 |
21 | 74 | 75 |
76 | @yield('content') 77 |
78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /routes/admin.php: -------------------------------------------------------------------------------- 1 | 'admin', 'as' => 'admin.', 'middleware' => ['auth']], function () { 14 | Route::get('/', [AdminController::class, 'index'])->name('index'); 15 | 16 | // profile 17 | Route::get('profile', [ProfileController::class, 'index'])->name('profile.index'); 18 | Route::put('profile-update', [ProfileController::class, 'update'])->name('profile.update'); 19 | Route::get('change-password', [ProfileController::class, 'password'])->name('password.index'); 20 | Route::put('update-password', [ProfileController::class, 'updatePassword'])->name('password.update'); 21 | 22 | Route::resource('users', UserController::class); 23 | Route::get('user-ban-unban/{id}/{status}', 'UserController@banUnban')->name('user.banUnban'); 24 | Route::resource('roles', RoleController::class); 25 | Route::resource('permissions', PermissionController::class); 26 | }); 27 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/breadcrumbs.php: -------------------------------------------------------------------------------- 1 | push('Dashboard', route('admin.index')); 10 | }); 11 | Breadcrumbs::for('admin.users.index', function (BreadcrumbTrail $trail): void { 12 | $trail->parent('admin.index'); 13 | $trail->push('Users', route('admin.users.index')); 14 | }); 15 | Breadcrumbs::for('admin.users.create', function (BreadcrumbTrail $trail): void { 16 | $trail->parent('admin.users.index'); 17 | $trail->push('Add new user', route('admin.users.create')); 18 | }); 19 | // Role 20 | Breadcrumbs::for('admin.roles.index', function (BreadcrumbTrail $trail): void { 21 | $trail->parent('admin.index'); 22 | $trail->push('Roles', route('admin.roles.index')); 23 | }); 24 | Breadcrumbs::for('admin.roles.create', function (BreadcrumbTrail $trail): void { 25 | $trail->parent('admin.roles.index'); 26 | 27 | $trail->push('Add new role', route('admin.roles.create')); 28 | }); 29 | Breadcrumbs::for('admin.roles.edit', function (BreadcrumbTrail $trail, Role $post): void { 30 | $trail->parent('admin.roles.index'); 31 | 32 | $trail->push($post->name, route('admin.roles.edit', $post)); 33 | }); 34 | // Permission 35 | Breadcrumbs::for('admin.permissions.index', function (BreadcrumbTrail $trail): void { 36 | $trail->parent('admin.index'); 37 | $trail->push('Permissions', route('admin.permissions.index')); 38 | }); 39 | Breadcrumbs::for('admin.permissions.create', function (BreadcrumbTrail $trail): void { 40 | $trail->parent('admin.permissions.index'); 41 | 42 | $trail->push('Add new permission', route('admin.permissions.create')); 43 | }); 44 | Breadcrumbs::for('admin.permissions.edit', function (BreadcrumbTrail $trail, Permission $post): void { 45 | $trail->parent('admin.permissions.index'); 46 | 47 | $trail->push($post->name, route('admin.permissions.edit', $post)); 48 | }); 49 | // profile 50 | Breadcrumbs::for('admin.profile.index', function (BreadcrumbTrail $trail): void { 51 | $trail->parent('admin.index'); 52 | $trail->push('Profile', route('admin.profile.index')); 53 | }); 54 | // change password 55 | Breadcrumbs::for('admin.password.index', function (BreadcrumbTrail $trail): void { 56 | $trail->parent('admin.index'); 57 | $trail->push('Change Password', route('admin.password.index')); 58 | }); 59 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('home'); 24 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 18 | 19 | return $app; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel({ 7 | input: [ 8 | 'resources/sass/app.scss', 9 | 'resources/js/app.js', 10 | ], 11 | refresh: true, 12 | }), 13 | ], 14 | }); 15 | --------------------------------------------------------------------------------