├── .env.example
├── .gitattributes
├── .gitignore
├── README.md
├── app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Admin
│ │ │ ├── HomeController.php
│ │ │ ├── PermissionsController.php
│ │ │ ├── RolesController.php
│ │ │ └── UsersController.php
│ │ ├── Api
│ │ │ └── V1
│ │ │ │ └── Admin
│ │ │ │ ├── PermissionsApiController.php
│ │ │ │ ├── RolesApiController.php
│ │ │ │ └── UsersApiController.php
│ │ ├── Auth
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── LoginController.php
│ │ │ ├── RegisterController.php
│ │ │ ├── ResetPasswordController.php
│ │ │ └── VerificationController.php
│ │ └── Controller.php
│ ├── Kernel.php
│ ├── Middleware
│ │ ├── AuthGates.php
│ │ ├── Authenticate.php
│ │ ├── CheckForMaintenanceMode.php
│ │ ├── EncryptCookies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── SetLocale.php
│ │ ├── TrimStrings.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
│ ├── Requests
│ │ ├── MassDestroyPermissionRequest.php
│ │ ├── MassDestroyRoleRequest.php
│ │ ├── MassDestroyUserRequest.php
│ │ ├── StorePermissionRequest.php
│ │ ├── StoreRoleRequest.php
│ │ ├── StoreUserRequest.php
│ │ ├── UpdatePermissionRequest.php
│ │ ├── UpdateRoleRequest.php
│ │ └── UpdateUserRequest.php
│ └── Resources
│ │ └── Admin
│ │ ├── PermissionResource.php
│ │ ├── RoleResource.php
│ │ └── UserResource.php
├── Permission.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Role.php
└── User.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── database.php
├── filesystems.php
├── hashing.php
├── logging.php
├── mail.php
├── panel.php
├── queue.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2019_09_28_000000_create_permissions_table.php
│ ├── 2019_09_28_000001_create_roles_table.php
│ ├── 2019_09_28_000002_create_users_table.php
│ ├── 2019_09_28_000003_create_permission_role_pivot_table.php
│ └── 2019_09_28_000004_create_role_user_pivot_table.php
└── seeds
│ ├── DatabaseSeeder.php
│ ├── PermissionRoleTableSeeder.php
│ ├── PermissionsTableSeeder.php
│ ├── RoleUserTableSeeder.php
│ ├── RolesTableSeeder.php
│ └── UsersTableSeeder.php
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── a1ecc3b826d01251edddf29c3e4e1e97.woff
├── assets
│ ├── 36d50c1381fda7c71d12b6643cbe1ee0.svg
│ ├── 6d16f95495605c95172bc8c924720bff.svg
│ └── static
│ │ ├── fonts
│ │ └── icons
│ │ │ ├── fontawesome
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ │ │ └── themify
│ │ │ ├── themify.eot
│ │ │ ├── themify.svg
│ │ │ ├── themify.ttf
│ │ │ └── themify.woff
│ │ └── images
│ │ ├── 404.png
│ │ ├── 500.png
│ │ ├── bg.jpg
│ │ ├── datatables
│ │ ├── sort_asc.png
│ │ ├── sort_asc_disabled.png
│ │ ├── sort_both.png
│ │ ├── sort_desc.png
│ │ └── sort_desc_disabled.png
│ │ ├── logo.png
│ │ └── logo.svg
├── css
│ ├── custom.css
│ └── style.css
├── e23a7dcaefbde4e74e263247aa42ecd7.ttf
├── favicon.ico
├── index.php
├── js
│ ├── bundle.js
│ ├── main.js
│ └── vendor.js
└── robots.txt
├── resources
├── js
│ ├── app.js
│ └── bootstrap.js
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── cruds.php
│ │ ├── global.php
│ │ ├── pagination.php
│ │ ├── panel.php
│ │ ├── passwords.php
│ │ └── validation.php
├── sass
│ └── app.scss
└── views
│ ├── admin
│ ├── permissions
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── roles
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ └── users
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── auth
│ ├── login.blade.php
│ └── passwords
│ │ ├── email.blade.php
│ │ └── reset.blade.php
│ ├── home.blade.php
│ ├── layouts
│ ├── admin.blade.php
│ └── app.blade.php
│ ├── partials
│ └── menu.blade.php
│ └── welcome.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ ├── .gitignore
│ │ └── data
│ │ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tests
├── Browser
│ ├── PermissionsTest.php
│ ├── RolesTest.php
│ └── UsersTest.php
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
├── Unit
│ └── ExampleTest.php
└── bootstrap.php
├── webpack.mix.js
└── yarn.lock
/.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 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=laravel
13 | DB_USERNAME=root
14 | DB_PASSWORD=
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=file
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_DRIVER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 |
33 | AWS_ACCESS_KEY_ID=
34 | AWS_SECRET_ACCESS_KEY=
35 | AWS_DEFAULT_REGION=us-east-1
36 | AWS_BUCKET=
37 |
38 | PUSHER_APP_ID=
39 | PUSHER_APP_KEY=
40 | PUSHER_APP_SECRET=
41 | PUSHER_APP_CLUSTER=mt1
42 |
43 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
44 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
45 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | .env
7 | .env.backup
8 | .phpunit.result.cache
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Laravel Adminator Dashboard
2 |
3 | Simple Laravel adminpanel based on [Adminator Bootstrap theme](https://github.com/puikinsh/Adminator-admin-dashboard)
4 |
5 | Generated with [QuickAdminPanel generator](https://2019.quickadminpanel.com) and manually applied front-end theme.
6 |
7 | What's inside:
8 |
9 | - Login/Register functionality with default Laravel
10 | - Managing Users/Roles/Permissions CRUDs: tables, and forms
11 |
12 | 
13 |
14 | 
15 |
16 | 
17 |
18 |
19 | ---
20 |
21 | ## How to use
22 |
23 | - Clone the repository with __git clone__
24 | - Copy __.env.example__ file to __.env__ and edit database credentials there
25 | - Run __composer install__
26 | - Run __php artisan key:generate__
27 | - Run __php artisan migrate --seed__ (it has some seeded data for your testing)
28 | - That's it: launch the main URL.
29 | - You can login to adminpanel with default credentials __admin@admin.com__ - __password__
30 |
31 | ## License
32 |
33 | Basically, feel free to use and re-use any way you want.
34 |
35 | ---
36 |
37 | ## More from our LaravelDaily Team
38 |
39 | - Check out our adminpanel generator [QuickAdminPanel](https://quickadminpanel.com)
40 | - Read our [Blog with Laravel Tutorials](https://laraveldaily.com)
41 | - FREE E-book: [50 Laravel Quick Tips (and counting)](https://laraveldaily.com/free-e-book-40-laravel-quick-tips-and-counting/)
42 | - Subscribe to our [YouTube channel Laravel Business](https://www.youtube.com/channel/UCTuplgOBi6tJIlesIboymGA)
43 | - Enroll in our [Laravel Online Courses](https://laraveldaily.teachable.com/)
44 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 |
31 | /**
32 | * Register the commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | $this->load(__DIR__.'/Commands');
39 |
40 | require base_path('routes/console.php');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | all());
35 |
36 | return redirect()->route('admin.permissions.index');
37 |
38 | }
39 |
40 | public function edit(Permission $permission)
41 | {
42 | abort_if(Gate::denies('permission_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
43 |
44 | return view('admin.permissions.edit', compact('permission'));
45 | }
46 |
47 | public function update(UpdatePermissionRequest $request, Permission $permission)
48 | {
49 | $permission->update($request->all());
50 |
51 | return redirect()->route('admin.permissions.index');
52 |
53 | }
54 |
55 | public function show(Permission $permission)
56 | {
57 | abort_if(Gate::denies('permission_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
58 |
59 | return view('admin.permissions.show', compact('permission'));
60 | }
61 |
62 | public function destroy(Permission $permission)
63 | {
64 | abort_if(Gate::denies('permission_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
65 |
66 | $permission->delete();
67 |
68 | return back();
69 |
70 | }
71 |
72 | public function massDestroy(MassDestroyPermissionRequest $request)
73 | {
74 | Permission::whereIn('id', request('ids'))->delete();
75 |
76 | return response(null, Response::HTTP_NO_CONTENT);
77 |
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/RolesController.php:
--------------------------------------------------------------------------------
1 | pluck('title', 'id');
31 |
32 | return view('admin.roles.create', compact('permissions'));
33 | }
34 |
35 | public function store(StoreRoleRequest $request)
36 | {
37 | $role = Role::create($request->all());
38 | $role->permissions()->sync($request->input('permissions', []));
39 |
40 | return redirect()->route('admin.roles.index');
41 |
42 | }
43 |
44 | public function edit(Role $role)
45 | {
46 | abort_if(Gate::denies('role_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
47 |
48 | $permissions = Permission::all()->pluck('title', 'id');
49 |
50 | $role->load('permissions');
51 |
52 | return view('admin.roles.edit', compact('permissions', 'role'));
53 | }
54 |
55 | public function update(UpdateRoleRequest $request, Role $role)
56 | {
57 | $role->update($request->all());
58 | $role->permissions()->sync($request->input('permissions', []));
59 |
60 | return redirect()->route('admin.roles.index');
61 |
62 | }
63 |
64 | public function show(Role $role)
65 | {
66 | abort_if(Gate::denies('role_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
67 |
68 | $role->load('permissions');
69 |
70 | return view('admin.roles.show', compact('role'));
71 | }
72 |
73 | public function destroy(Role $role)
74 | {
75 | abort_if(Gate::denies('role_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
76 |
77 | $role->delete();
78 |
79 | return back();
80 |
81 | }
82 |
83 | public function massDestroy(MassDestroyRoleRequest $request)
84 | {
85 | Role::whereIn('id', request('ids'))->delete();
86 |
87 | return response(null, Response::HTTP_NO_CONTENT);
88 |
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/UsersController.php:
--------------------------------------------------------------------------------
1 | pluck('title', 'id');
31 |
32 | return view('admin.users.create', compact('roles'));
33 | }
34 |
35 | public function store(StoreUserRequest $request)
36 | {
37 | $user = User::create($request->all());
38 | $user->roles()->sync($request->input('roles', []));
39 |
40 | return redirect()->route('admin.users.index');
41 |
42 | }
43 |
44 | public function edit(User $user)
45 | {
46 | abort_if(Gate::denies('user_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
47 |
48 | $roles = Role::all()->pluck('title', 'id');
49 |
50 | $user->load('roles');
51 |
52 | return view('admin.users.edit', compact('roles', 'user'));
53 | }
54 |
55 | public function update(UpdateUserRequest $request, User $user)
56 | {
57 | $user->update($request->all());
58 | $user->roles()->sync($request->input('roles', []));
59 |
60 | return redirect()->route('admin.users.index');
61 |
62 | }
63 |
64 | public function show(User $user)
65 | {
66 | abort_if(Gate::denies('user_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
67 |
68 | $user->load('roles');
69 |
70 | return view('admin.users.show', compact('user'));
71 | }
72 |
73 | public function destroy(User $user)
74 | {
75 | abort_if(Gate::denies('user_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
76 |
77 | $user->delete();
78 |
79 | return back();
80 |
81 | }
82 |
83 | public function massDestroy(MassDestroyUserRequest $request)
84 | {
85 | User::whereIn('id', request('ids'))->delete();
86 |
87 | return response(null, Response::HTTP_NO_CONTENT);
88 |
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Api/V1/Admin/PermissionsApiController.php:
--------------------------------------------------------------------------------
1 | all());
27 |
28 | return (new PermissionResource($permission))
29 | ->response()
30 | ->setStatusCode(Response::HTTP_CREATED);
31 |
32 | }
33 |
34 | public function show(Permission $permission)
35 | {
36 | abort_if(Gate::denies('permission_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
37 |
38 | return new PermissionResource($permission);
39 |
40 | }
41 |
42 | public function update(UpdatePermissionRequest $request, Permission $permission)
43 | {
44 | $permission->update($request->all());
45 |
46 | return (new PermissionResource($permission))
47 | ->response()
48 | ->setStatusCode(Response::HTTP_ACCEPTED);
49 |
50 | }
51 |
52 | public function destroy(Permission $permission)
53 | {
54 | abort_if(Gate::denies('permission_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
55 |
56 | $permission->delete();
57 |
58 | return response(null, Response::HTTP_NO_CONTENT);
59 |
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Api/V1/Admin/RolesApiController.php:
--------------------------------------------------------------------------------
1 | get());
21 |
22 | }
23 |
24 | public function store(StoreRoleRequest $request)
25 | {
26 | $role = Role::create($request->all());
27 | $role->permissions()->sync($request->input('permissions', []));
28 |
29 | return (new RoleResource($role))
30 | ->response()
31 | ->setStatusCode(Response::HTTP_CREATED);
32 |
33 | }
34 |
35 | public function show(Role $role)
36 | {
37 | abort_if(Gate::denies('role_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
38 |
39 | return new RoleResource($role->load(['permissions']));
40 |
41 | }
42 |
43 | public function update(UpdateRoleRequest $request, Role $role)
44 | {
45 | $role->update($request->all());
46 | $role->permissions()->sync($request->input('permissions', []));
47 |
48 | return (new RoleResource($role))
49 | ->response()
50 | ->setStatusCode(Response::HTTP_ACCEPTED);
51 |
52 | }
53 |
54 | public function destroy(Role $role)
55 | {
56 | abort_if(Gate::denies('role_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
57 |
58 | $role->delete();
59 |
60 | return response(null, Response::HTTP_NO_CONTENT);
61 |
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Api/V1/Admin/UsersApiController.php:
--------------------------------------------------------------------------------
1 | get());
21 |
22 | }
23 |
24 | public function store(StoreUserRequest $request)
25 | {
26 | $user = User::create($request->all());
27 | $user->roles()->sync($request->input('roles', []));
28 |
29 | return (new UserResource($user))
30 | ->response()
31 | ->setStatusCode(Response::HTTP_CREATED);
32 |
33 | }
34 |
35 | public function show(User $user)
36 | {
37 | abort_if(Gate::denies('user_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
38 |
39 | return new UserResource($user->load(['roles']));
40 |
41 | }
42 |
43 | public function update(UpdateUserRequest $request, User $user)
44 | {
45 | $user->update($request->all());
46 | $user->roles()->sync($request->input('roles', []));
47 |
48 | return (new UserResource($user))
49 | ->response()
50 | ->setStatusCode(Response::HTTP_ACCEPTED);
51 |
52 | }
53 |
54 | public function destroy(User $user)
55 | {
56 | abort_if(Gate::denies('user_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
57 |
58 | $user->delete();
59 |
60 | return response(null, Response::HTTP_NO_CONTENT);
61 |
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ForgotPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/LoginController.php:
--------------------------------------------------------------------------------
1 | middleware('guest')->except('logout');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/RegisterController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
41 | }
42 |
43 | /**
44 | * Get a validator for an incoming registration request.
45 | *
46 | * @param array $data
47 | * @return \Illuminate\Contracts\Validation\Validator
48 | */
49 | protected function validator(array $data)
50 | {
51 | return Validator::make($data, [
52 | 'name' => ['required', 'string', 'max:255'],
53 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
54 | 'password' => ['required', 'string', 'min:8', 'confirmed'],
55 | ]);
56 | }
57 |
58 | /**
59 | * Create a new user instance after a valid registration.
60 | *
61 | * @param array $data
62 | * @return \App\User
63 | */
64 | protected function create(array $data)
65 | {
66 | return User::create([
67 | 'name' => $data['name'],
68 | 'email' => $data['email'],
69 | 'password' => Hash::make($data['password']),
70 | ]);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ResetPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/VerificationController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
38 | $this->middleware('signed')->only('verify');
39 | $this->middleware('throttle:6,1')->only('verify', 'resend');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | [
19 | 'throttle:60,1',
20 | 'bindings',
21 | \App\Http\Middleware\AuthGates::class,
22 | ],
23 | 'web' => [
24 | \App\Http\Middleware\EncryptCookies::class,
25 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
26 | \Illuminate\Session\Middleware\StartSession::class,
27 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
28 | \App\Http\Middleware\VerifyCsrfToken::class,
29 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
30 | \App\Http\Middleware\AuthGates::class,
31 | \App\Http\Middleware\SetLocale::class,
32 | ],
33 | ];
34 |
35 | protected $routeMiddleware = [
36 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
37 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
38 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
39 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
40 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
41 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
42 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
43 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
44 | ];
45 | }
46 |
--------------------------------------------------------------------------------
/app/Http/Middleware/AuthGates.php:
--------------------------------------------------------------------------------
1 | runningInConsole() && $user) {
16 | $roles = Role::with('permissions')->get();
17 | $permissionsArray = [];
18 |
19 | foreach ($roles as $role) {
20 | foreach ($role->permissions as $permissions) {
21 | $permissionsArray[$permissions->title][] = $role->id;
22 | }
23 |
24 | }
25 |
26 | foreach ($permissionsArray as $title => $roles) {
27 | Gate::define($title, function (\App\User $user) use ($roles) {
28 | return count(array_intersect($user->roles->pluck('id')->toArray(), $roles)) > 0;
29 | });
30 | }
31 |
32 | }
33 |
34 | return $next($request);
35 |
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/CheckForMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/home');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Middleware/SetLocale.php:
--------------------------------------------------------------------------------
1 | put('language', request('change_language'));
13 | $language = request('change_language');
14 | } elseif (session('language')) {
15 | $language = session('language');
16 | } elseif (config('panel.primary_language')) {
17 | $language = config('panel.primary_language');
18 | }
19 |
20 | if (isset($language)) {
21 | app()->setLocale($language);
22 | }
23 |
24 | return $next($request);
25 |
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | 'required|array',
24 | 'ids.*' => 'exists:permissions,id',
25 | ];
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyRoleRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
24 | 'ids.*' => 'exists:roles,id',
25 | ];
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyUserRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
24 | 'ids.*' => 'exists:users,id',
25 | ];
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Http/Requests/StorePermissionRequest.php:
--------------------------------------------------------------------------------
1 | [
24 | 'required',
25 | ],
26 | ];
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreRoleRequest.php:
--------------------------------------------------------------------------------
1 | [
24 | 'required',
25 | ],
26 | 'permissions.*' => [
27 | 'integer',
28 | ],
29 | 'permissions' => [
30 | 'required',
31 | 'array',
32 | ],
33 | ];
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreUserRequest.php:
--------------------------------------------------------------------------------
1 | [
24 | 'required',
25 | ],
26 | 'email' => [
27 | 'required',
28 | ],
29 | 'password' => [
30 | 'required',
31 | ],
32 | 'roles.*' => [
33 | 'integer',
34 | ],
35 | 'roles' => [
36 | 'required',
37 | 'array',
38 | ],
39 | ];
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdatePermissionRequest.php:
--------------------------------------------------------------------------------
1 | [
24 | 'required',
25 | ],
26 | ];
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateRoleRequest.php:
--------------------------------------------------------------------------------
1 | [
24 | 'required',
25 | ],
26 | 'permissions.*' => [
27 | 'integer',
28 | ],
29 | 'permissions' => [
30 | 'required',
31 | 'array',
32 | ],
33 | ];
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateUserRequest.php:
--------------------------------------------------------------------------------
1 | [
24 | 'required',
25 | ],
26 | 'email' => [
27 | 'required',
28 | ],
29 | 'roles.*' => [
30 | 'integer',
31 | ],
32 | 'roles' => [
33 | 'required',
34 | 'array',
35 | ],
36 | ];
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Resources/Admin/PermissionResource.php:
--------------------------------------------------------------------------------
1 | belongsToMany(Role::class);
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
18 | ];
19 |
20 | /**
21 | * Register any authentication / authorization services.
22 | *
23 | * @return void
24 | */
25 | public function boot()
26 | {
27 | $this->registerPolicies();
28 |
29 | if (!app()->runningInConsole()) {
30 | Passport::routes();
31 | };
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | *
26 | * @return void
27 | */
28 | public function boot()
29 | {
30 | parent::boot();
31 |
32 | //
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::middleware('web')
55 | ->namespace($this->namespace)
56 | ->group(base_path('routes/web.php'));
57 | }
58 |
59 | /**
60 | * Define the "api" routes for the application.
61 | *
62 | * These routes are typically stateless.
63 | *
64 | * @return void
65 | */
66 | protected function mapApiRoutes()
67 | {
68 | Route::prefix('api')
69 | ->middleware('api')
70 | ->namespace($this->namespace)
71 | ->group(base_path('routes/api.php'));
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/Role.php:
--------------------------------------------------------------------------------
1 | belongsToMany(User::class);
30 |
31 | }
32 |
33 | public function permissions()
34 | {
35 | return $this->belongsToMany(Permission::class);
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | format(config('panel.date_format') . ' ' . config('panel.time_format')) : null;
46 |
47 | }
48 |
49 | public function setEmailVerifiedAtAttribute($value)
50 | {
51 | $this->attributes['email_verified_at'] = $value ? Carbon::createFromFormat(config('panel.date_format') . ' ' . config('panel.time_format'), $value)->format('Y-m-d H:i:s') : null;
52 |
53 | }
54 |
55 | public function setPasswordAttribute($input)
56 | {
57 | if ($input) {
58 | $this->attributes['password'] = app('hash')->needsRehash($input) ? Hash::make($input) : $input;
59 | }
60 |
61 | }
62 |
63 | public function sendPasswordResetNotification($token)
64 | {
65 | $this->notify(new ResetPassword($token));
66 |
67 | }
68 |
69 | public function roles()
70 | {
71 | return $this->belongsToMany(Role::class);
72 |
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/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 Laravel Framework.",
5 | "keywords": [
6 | "framework",
7 | "laravel"
8 | ],
9 | "license": "MIT",
10 | "require": {
11 | "php": "^7.2",
12 | "doctrine/dbal": "^2.9",
13 | "fideloper/proxy": "^4.0",
14 | "laravel/framework": "^6.0",
15 | "laravel/tinker": "^1.0",
16 | "yajra/laravel-datatables-oracle": "^9.6",
17 | "laravel/passport": "^7.4"
18 | },
19 | "require-dev": {
20 | "facade/ignition": "^1.4",
21 | "fzaninotto/faker": "^1.4",
22 | "mockery/mockery": "^1.0",
23 | "nunomaduro/collision": "^3.0",
24 | "phpunit/phpunit": "^8.0"
25 | },
26 | "config": {
27 | "optimize-autoloader": true,
28 | "preferred-install": "dist",
29 | "sort-packages": true
30 | },
31 | "extra": {
32 | "laravel": {
33 | "dont-discover": []
34 | }
35 | },
36 | "autoload": {
37 | "psr-4": {
38 | "App\\": "app/"
39 | },
40 | "classmap": [
41 | "database/seeds",
42 | "database/factories"
43 | ]
44 | },
45 | "autoload-dev": {
46 | "psr-4": {
47 | "Tests\\": "tests/"
48 | }
49 | },
50 | "minimum-stability": "dev",
51 | "prefer-stable": true,
52 | "scripts": {
53 | "post-autoload-dump": [
54 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
55 | "@php artisan package:discover --ansi"
56 | ],
57 | "post-root-package-install": [
58 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
59 | ],
60 | "post-create-project-cmd": [
61 | "@php artisan key:generate --ansi"
62 | ]
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/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", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'passport',
46 | 'provider' => 'users',
47 | 'hash' => false,
48 | ],
49 | ],
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | User Providers
54 | |--------------------------------------------------------------------------
55 | |
56 | | All authentication drivers have a user provider. This defines how the
57 | | users are actually retrieved out of your database or other storage
58 | | mechanisms used by this application to persist your user's data.
59 | |
60 | | If you have multiple user tables or models you may configure multiple
61 | | sources which represent each model / table. These sources may then
62 | | be assigned to any extra authentication guards you have defined.
63 | |
64 | | Supported: "database", "eloquent"
65 | |
66 | */
67 |
68 | 'providers' => [
69 | 'users' => [
70 | 'driver' => 'eloquent',
71 | 'model' => App\User::class,
72 | ],
73 |
74 | // 'users' => [
75 | // 'driver' => 'database',
76 | // 'table' => 'users',
77 | // ],
78 | ],
79 |
80 | /*
81 | |--------------------------------------------------------------------------
82 | | Resetting Passwords
83 | |--------------------------------------------------------------------------
84 | |
85 | | You may specify multiple password reset configurations if you have more
86 | | than one user table or model in the application and you want to have
87 | | separate password reset settings based on the specific user types.
88 | |
89 | | The expire time is the number of minutes that the reset token should be
90 | | considered valid. This security feature keeps tokens short-lived so
91 | | they have less time to be guessed. You may change this as needed.
92 | |
93 | */
94 |
95 | 'passwords' => [
96 | 'users' => [
97 | 'provider' => 'users',
98 | 'table' => 'password_resets',
99 | 'expire' => 60,
100 | ],
101 | ],
102 |
103 | ];
104 |
--------------------------------------------------------------------------------
/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 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Cache Stores
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may define all of the cache "stores" for your application as
29 | | well as their drivers. You may even define multiple stores for the
30 | | same cache driver to group types of items stored in your caches.
31 | |
32 | */
33 |
34 | 'stores' => [
35 |
36 | 'apc' => [
37 | 'driver' => 'apc',
38 | ],
39 |
40 | 'array' => [
41 | 'driver' => 'array',
42 | ],
43 |
44 | 'database' => [
45 | 'driver' => 'database',
46 | 'table' => 'cache',
47 | 'connection' => null,
48 | ],
49 |
50 | 'file' => [
51 | 'driver' => 'file',
52 | 'path' => storage_path('framework/cache/data'),
53 | ],
54 |
55 | 'memcached' => [
56 | 'driver' => 'memcached',
57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
58 | 'sasl' => [
59 | env('MEMCACHED_USERNAME'),
60 | env('MEMCACHED_PASSWORD'),
61 | ],
62 | 'options' => [
63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
64 | ],
65 | 'servers' => [
66 | [
67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
68 | 'port' => env('MEMCACHED_PORT', 11211),
69 | 'weight' => 100,
70 | ],
71 | ],
72 | ],
73 |
74 | 'redis' => [
75 | 'driver' => 'redis',
76 | 'connection' => 'cache',
77 | ],
78 |
79 | 'dynamodb' => [
80 | 'driver' => 'dynamodb',
81 | 'key' => env('AWS_ACCESS_KEY_ID'),
82 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
83 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
84 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
85 | 'endpoint' => env('DYNAMODB_ENDPOINT'),
86 | ],
87 |
88 | ],
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Cache Key Prefix
93 | |--------------------------------------------------------------------------
94 | |
95 | | When utilizing a RAM based store such as APC or Memcached, there might
96 | | be other applications utilizing the same cache. So, we'll specify a
97 | | value to get prefixed to all our keys so we can avoid collisions.
98 | |
99 | */
100 |
101 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
102 |
103 | ];
104 |
--------------------------------------------------------------------------------
/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 | 'schema' => '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 | ],
93 |
94 | ],
95 |
96 | /*
97 | |--------------------------------------------------------------------------
98 | | Migration Repository Table
99 | |--------------------------------------------------------------------------
100 | |
101 | | This table keeps track of all the migrations that have already run for
102 | | your application. Using this information, we can determine which of
103 | | the migrations on disk haven't actually been run in the database.
104 | |
105 | */
106 |
107 | 'migrations' => 'migrations',
108 |
109 | /*
110 | |--------------------------------------------------------------------------
111 | | Redis Databases
112 | |--------------------------------------------------------------------------
113 | |
114 | | Redis is an open source, fast, and advanced key-value store that also
115 | | provides a richer body of commands than a typical key-value system
116 | | such as APC or Memcached. Laravel makes it easy to dig right in.
117 | |
118 | */
119 |
120 | 'redis' => [
121 |
122 | 'client' => env('REDIS_CLIENT', 'phpredis'),
123 |
124 | 'options' => [
125 | 'cluster' => env('REDIS_CLUSTER', 'redis'),
126 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
127 | ],
128 |
129 | 'default' => [
130 | 'url' => env('REDIS_URL'),
131 | 'host' => env('REDIS_HOST', '127.0.0.1'),
132 | 'password' => env('REDIS_PASSWORD', null),
133 | 'port' => env('REDIS_PORT', 6379),
134 | 'database' => env('REDIS_DB', 0),
135 | ],
136 |
137 | 'cache' => [
138 | 'url' => env('REDIS_URL'),
139 | 'host' => env('REDIS_HOST', '127.0.0.1'),
140 | 'password' => env('REDIS_PASSWORD', null),
141 | 'port' => env('REDIS_PORT', 6379),
142 | 'database' => env('REDIS_CACHE_DB', 1),
143 | ],
144 |
145 | ],
146 |
147 | ];
148 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "sftp", "s3"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_ACCESS_KEY_ID'),
61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
62 | 'region' => env('AWS_DEFAULT_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | 'url' => env('AWS_URL'),
65 | ],
66 |
67 | ],
68 |
69 | ];
70 |
--------------------------------------------------------------------------------
/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' => 1024,
48 | 'threads' => 2,
49 | 'time' => 2,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'stack'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Log Channels
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may configure the log channels for your application. Out of
27 | | the box, Laravel uses the Monolog PHP logging library. This gives
28 | | you a variety of powerful log handlers / formatters to utilize.
29 | |
30 | | Available Drivers: "single", "daily", "slack", "syslog",
31 | | "errorlog", "monolog",
32 | | "custom", "stack"
33 | |
34 | */
35 |
36 | 'channels' => [
37 | 'stack' => [
38 | 'driver' => 'stack',
39 | 'channels' => ['daily'],
40 | 'ignore_exceptions' => false,
41 | ],
42 |
43 | 'single' => [
44 | 'driver' => 'single',
45 | 'path' => storage_path('logs/laravel.log'),
46 | 'level' => 'debug',
47 | ],
48 |
49 | 'daily' => [
50 | 'driver' => 'daily',
51 | 'path' => storage_path('logs/laravel.log'),
52 | 'level' => 'debug',
53 | 'days' => 14,
54 | ],
55 |
56 | 'slack' => [
57 | 'driver' => 'slack',
58 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
59 | 'username' => 'Laravel Log',
60 | 'emoji' => ':boom:',
61 | 'level' => 'critical',
62 | ],
63 |
64 | 'papertrail' => [
65 | 'driver' => 'monolog',
66 | 'level' => 'debug',
67 | 'handler' => SyslogUdpHandler::class,
68 | 'handler_with' => [
69 | 'host' => env('PAPERTRAIL_URL'),
70 | 'port' => env('PAPERTRAIL_PORT'),
71 | ],
72 | ],
73 |
74 | 'stderr' => [
75 | 'driver' => 'monolog',
76 | 'handler' => StreamHandler::class,
77 | 'formatter' => env('LOG_STDERR_FORMATTER'),
78 | 'with' => [
79 | 'stream' => 'php://stderr',
80 | ],
81 | ],
82 |
83 | 'syslog' => [
84 | 'driver' => 'syslog',
85 | 'level' => 'debug',
86 | ],
87 |
88 | 'errorlog' => [
89 | 'driver' => 'errorlog',
90 | 'level' => 'debug',
91 | ],
92 | ],
93 |
94 | ];
95 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_DRIVER', 'smtp'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | SMTP Host Address
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may provide the host address of the SMTP server used by your
27 | | applications. A default option is provided that is compatible with
28 | | the Mailgun mail service which will provide reliable deliveries.
29 | |
30 | */
31 |
32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
33 |
34 | /*
35 | |--------------------------------------------------------------------------
36 | | SMTP Host Port
37 | |--------------------------------------------------------------------------
38 | |
39 | | This is the SMTP port used by your application to deliver e-mails to
40 | | users of the application. Like the host we have set this value to
41 | | stay compatible with the Mailgun e-mail application by default.
42 | |
43 | */
44 |
45 | 'port' => env('MAIL_PORT', 587),
46 |
47 | /*
48 | |--------------------------------------------------------------------------
49 | | Global "From" Address
50 | |--------------------------------------------------------------------------
51 | |
52 | | You may wish for all e-mails sent by your application to be sent from
53 | | the same address. Here, you may specify a name and address that is
54 | | used globally for all e-mails that are sent by your application.
55 | |
56 | */
57 |
58 | 'from' => [
59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
60 | 'name' => env('MAIL_FROM_NAME', 'Example'),
61 | ],
62 |
63 | /*
64 | |--------------------------------------------------------------------------
65 | | E-Mail Encryption Protocol
66 | |--------------------------------------------------------------------------
67 | |
68 | | Here you may specify the encryption protocol that should be used when
69 | | the application send e-mail messages. A sensible default using the
70 | | transport layer security protocol should provide great security.
71 | |
72 | */
73 |
74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
75 |
76 | /*
77 | |--------------------------------------------------------------------------
78 | | SMTP Server Username
79 | |--------------------------------------------------------------------------
80 | |
81 | | If your SMTP server requires a username for authentication, you should
82 | | set it here. This will get used to authenticate with your server on
83 | | connection. You may also set the "password" value below this one.
84 | |
85 | */
86 |
87 | 'username' => env('MAIL_USERNAME'),
88 |
89 | 'password' => env('MAIL_PASSWORD'),
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Sendmail System Path
94 | |--------------------------------------------------------------------------
95 | |
96 | | When using the "sendmail" driver to send e-mails, we will need to know
97 | | the path to where Sendmail lives on this server. A default path has
98 | | been provided here, which will work well on most of your systems.
99 | |
100 | */
101 |
102 | 'sendmail' => '/usr/sbin/sendmail -bs',
103 |
104 | /*
105 | |--------------------------------------------------------------------------
106 | | Markdown Mail Settings
107 | |--------------------------------------------------------------------------
108 | |
109 | | If you are using Markdown based email rendering, you may configure your
110 | | theme and component paths here, allowing you to customize the design
111 | | of the emails. Or, you may simply stick with the Laravel defaults!
112 | |
113 | */
114 |
115 | 'markdown' => [
116 | 'theme' => 'default',
117 |
118 | 'paths' => [
119 | resource_path('views/vendor/mail'),
120 | ],
121 | ],
122 |
123 | /*
124 | |--------------------------------------------------------------------------
125 | | Log Channel
126 | |--------------------------------------------------------------------------
127 | |
128 | | If you are using the "log" driver, you may specify the logging channel
129 | | if you prefer to keep mail messages separate from other log entries
130 | | for simpler reading. Otherwise, the default channel will be used.
131 | |
132 | */
133 |
134 | 'log_channel' => env('MAIL_LOG_CHANNEL'),
135 |
136 | ];
137 |
--------------------------------------------------------------------------------
/config/panel.php:
--------------------------------------------------------------------------------
1 | 'Y-m-d',
5 | 'time_format' => 'H:i:s',
6 | 'primary_language' => 'en',
7 | 'available_languages' => [
8 | 'en' => 'English',
9 | 'lt' => 'Lithuanian',
10 | ],
11 | ];
12 |
--------------------------------------------------------------------------------
/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 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | 'block_for' => 0,
50 | ],
51 |
52 | 'sqs' => [
53 | 'driver' => 'sqs',
54 | 'key' => env('AWS_ACCESS_KEY_ID'),
55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'),
58 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
59 | ],
60 |
61 | 'redis' => [
62 | 'driver' => 'redis',
63 | 'connection' => 'default',
64 | 'queue' => env('REDIS_QUEUE', 'default'),
65 | 'retry_after' => 90,
66 | 'block_for' => null,
67 | ],
68 |
69 | ],
70 |
71 | /*
72 | |--------------------------------------------------------------------------
73 | | Failed Queue Jobs
74 | |--------------------------------------------------------------------------
75 | |
76 | | These options configure the behavior of failed queue job logging so you
77 | | can control which database and table are used to store the jobs that
78 | | have failed. You may change them to any database / table you wish.
79 | |
80 | */
81 |
82 | 'failed' => [
83 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
84 | 'database' => env('DB_CONNECTION', 'mysql'),
85 | 'table' => 'failed_jobs',
86 | ],
87 |
88 | ];
89 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | env('SESSION_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Session Lifetime
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may specify the number of minutes that you wish the session
29 | | to be allowed to remain idle before it expires. If you want them
30 | | to immediately expire on the browser closing, set that option.
31 | |
32 | */
33 |
34 | 'lifetime' => env('SESSION_LIFETIME', 120),
35 |
36 | 'expire_on_close' => false,
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Session Encryption
41 | |--------------------------------------------------------------------------
42 | |
43 | | This option allows you to easily specify that all of your session data
44 | | should be encrypted before it is stored. All encryption will be run
45 | | automatically by Laravel and you can use the Session like normal.
46 | |
47 | */
48 |
49 | 'encrypt' => false,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Session File Location
54 | |--------------------------------------------------------------------------
55 | |
56 | | When using the native session driver, we need a location where session
57 | | files may be stored. A default has been set for you but a different
58 | | location may be specified. This is only needed for file sessions.
59 | |
60 | */
61 |
62 | 'files' => storage_path('framework/sessions'),
63 |
64 | /*
65 | |--------------------------------------------------------------------------
66 | | Session Database Connection
67 | |--------------------------------------------------------------------------
68 | |
69 | | When using the "database" or "redis" session drivers, you may specify a
70 | | connection that should be used to manage these sessions. This should
71 | | correspond to a connection in your database configuration options.
72 | |
73 | */
74 |
75 | 'connection' => env('SESSION_CONNECTION', null),
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Session Database Table
80 | |--------------------------------------------------------------------------
81 | |
82 | | When using the "database" session driver, you may specify the table we
83 | | should use to manage the sessions. Of course, a sensible default is
84 | | provided for you; however, you are free to change this as needed.
85 | |
86 | */
87 |
88 | 'table' => 'sessions',
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Session Cache Store
93 | |--------------------------------------------------------------------------
94 | |
95 | | When using the "apc", "memcached", or "dynamodb" session drivers you may
96 | | list a cache store that should be used for these sessions. This value
97 | | must match with one of the application's configured cache "stores".
98 | |
99 | */
100 |
101 | 'store' => env('SESSION_STORE', null),
102 |
103 | /*
104 | |--------------------------------------------------------------------------
105 | | Session Sweeping Lottery
106 | |--------------------------------------------------------------------------
107 | |
108 | | Some session drivers must manually sweep their storage location to get
109 | | rid of old sessions from storage. Here are the chances that it will
110 | | happen on a given request. By default, the odds are 2 out of 100.
111 | |
112 | */
113 |
114 | 'lottery' => [2, 100],
115 |
116 | /*
117 | |--------------------------------------------------------------------------
118 | | Session Cookie Name
119 | |--------------------------------------------------------------------------
120 | |
121 | | Here you may change the name of the cookie used to identify a session
122 | | instance by ID. The name specified here will get used every time a
123 | | new session cookie is created by the framework for every driver.
124 | |
125 | */
126 |
127 | 'cookie' => env(
128 | 'SESSION_COOKIE',
129 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
130 | ),
131 |
132 | /*
133 | |--------------------------------------------------------------------------
134 | | Session Cookie Path
135 | |--------------------------------------------------------------------------
136 | |
137 | | The session cookie path determines the path for which the cookie will
138 | | be regarded as available. Typically, this will be the root path of
139 | | your application but you are free to change this when necessary.
140 | |
141 | */
142 |
143 | 'path' => '/',
144 |
145 | /*
146 | |--------------------------------------------------------------------------
147 | | Session Cookie Domain
148 | |--------------------------------------------------------------------------
149 | |
150 | | Here you may change the domain of the cookie used to identify a session
151 | | in your application. This will determine which domains the cookie is
152 | | available to in your application. A sensible default has been set.
153 | |
154 | */
155 |
156 | 'domain' => env('SESSION_DOMAIN', null),
157 |
158 | /*
159 | |--------------------------------------------------------------------------
160 | | HTTPS Only Cookies
161 | |--------------------------------------------------------------------------
162 | |
163 | | By setting this option to true, session cookies will only be sent back
164 | | to the server if the browser has a HTTPS connection. This will keep
165 | | the cookie from being sent to you if it can not be done securely.
166 | |
167 | */
168 |
169 | 'secure' => env('SESSION_SECURE_COOKIE', false),
170 |
171 | /*
172 | |--------------------------------------------------------------------------
173 | | HTTP Access Only
174 | |--------------------------------------------------------------------------
175 | |
176 | | Setting this value to true will prevent JavaScript from accessing the
177 | | value of the cookie and the cookie will only be accessible through
178 | | the HTTP protocol. You are free to modify this option if needed.
179 | |
180 | */
181 |
182 | 'http_only' => true,
183 |
184 | /*
185 | |--------------------------------------------------------------------------
186 | | Same-Site Cookies
187 | |--------------------------------------------------------------------------
188 | |
189 | | This option determines how your cookies behave when cross-site requests
190 | | take place, and can be used to mitigate CSRF attacks. By default, we
191 | | do not enable this as other CSRF protection services are in place.
192 | |
193 | | Supported: "lax", "strict"
194 | |
195 | */
196 |
197 | 'same_site' => null,
198 |
199 | ];
200 |
--------------------------------------------------------------------------------
/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 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(User::class, function (Faker $faker) {
20 | return [
21 | 'name' => $faker->name,
22 | 'email' => $faker->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 |
--------------------------------------------------------------------------------
/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_09_28_000000_create_permissions_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
13 |
14 | $table->string('title')->nullable();
15 |
16 | $table->timestamps();
17 |
18 | $table->softDeletes();
19 |
20 | });
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_28_000001_create_roles_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
13 |
14 | $table->string('title')->nullable();
15 |
16 | $table->timestamps();
17 |
18 | $table->softDeletes();
19 |
20 | });
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_28_000002_create_users_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
13 |
14 | $table->string('name');
15 |
16 | $table->string('email');
17 |
18 | $table->datetime('email_verified_at')->nullable();
19 |
20 | $table->string('password');
21 |
22 | $table->string('remember_token')->nullable();
23 |
24 | $table->timestamps();
25 |
26 | $table->softDeletes();
27 |
28 | });
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_28_000003_create_permission_role_pivot_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('role_id');
13 |
14 | $table->foreign('role_id', 'role_id_fk_6874')->references('id')->on('roles')->onDelete('cascade');
15 |
16 | $table->unsignedInteger('permission_id');
17 |
18 | $table->foreign('permission_id', 'permission_id_fk_6874')->references('id')->on('permissions')->onDelete('cascade');
19 |
20 | });
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_28_000004_create_role_user_pivot_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('user_id');
13 |
14 | $table->foreign('user_id', 'user_id_fk_6883')->references('id')->on('users')->onDelete('cascade');
15 |
16 | $table->unsignedInteger('role_id');
17 |
18 | $table->foreign('role_id', 'role_id_fk_6883')->references('id')->on('roles')->onDelete('cascade');
19 |
20 | });
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call([
10 | PermissionsTableSeeder::class,
11 | RolesTableSeeder::class,
12 | PermissionRoleTableSeeder::class,
13 | UsersTableSeeder::class,
14 | RoleUserTableSeeder::class,
15 | ]);
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/seeds/PermissionRoleTableSeeder.php:
--------------------------------------------------------------------------------
1 | permissions()->sync($admin_permissions->pluck('id'));
13 | $user_permissions = $admin_permissions->filter(function ($permission) {
14 | return substr($permission->title, 0, 5) != 'user_' && substr($permission->title, 0, 5) != 'role_' && substr($permission->title, 0, 11) != 'permission_';
15 | });
16 | Role::findOrFail(2)->permissions()->sync($user_permissions);
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/database/seeds/PermissionsTableSeeder.php:
--------------------------------------------------------------------------------
1 | '1',
13 | 'title' => 'permission_create',
14 | 'created_at' => '2019-09-28 14:22:15',
15 | 'updated_at' => '2019-09-28 14:22:15',
16 | ],
17 | [
18 | 'id' => '2',
19 | 'title' => 'permission_edit',
20 | 'created_at' => '2019-09-28 14:22:15',
21 | 'updated_at' => '2019-09-28 14:22:15',
22 | ],
23 | [
24 | 'id' => '3',
25 | 'title' => 'permission_show',
26 | 'created_at' => '2019-09-28 14:22:15',
27 | 'updated_at' => '2019-09-28 14:22:15',
28 | ],
29 | [
30 | 'id' => '4',
31 | 'title' => 'permission_delete',
32 | 'created_at' => '2019-09-28 14:22:15',
33 | 'updated_at' => '2019-09-28 14:22:15',
34 | ],
35 | [
36 | 'id' => '5',
37 | 'title' => 'permission_access',
38 | 'created_at' => '2019-09-28 14:22:15',
39 | 'updated_at' => '2019-09-28 14:22:15',
40 | ],
41 | [
42 | 'id' => '6',
43 | 'title' => 'role_create',
44 | 'created_at' => '2019-09-28 14:22:15',
45 | 'updated_at' => '2019-09-28 14:22:15',
46 | ],
47 | [
48 | 'id' => '7',
49 | 'title' => 'role_edit',
50 | 'created_at' => '2019-09-28 14:22:15',
51 | 'updated_at' => '2019-09-28 14:22:15',
52 | ],
53 | [
54 | 'id' => '8',
55 | 'title' => 'role_show',
56 | 'created_at' => '2019-09-28 14:22:15',
57 | 'updated_at' => '2019-09-28 14:22:15',
58 | ],
59 | [
60 | 'id' => '9',
61 | 'title' => 'role_delete',
62 | 'created_at' => '2019-09-28 14:22:15',
63 | 'updated_at' => '2019-09-28 14:22:15',
64 | ],
65 | [
66 | 'id' => '10',
67 | 'title' => 'role_access',
68 | 'created_at' => '2019-09-28 14:22:15',
69 | 'updated_at' => '2019-09-28 14:22:15',
70 | ],
71 | [
72 | 'id' => '11',
73 | 'title' => 'user_management_access',
74 | 'created_at' => '2019-09-28 14:22:15',
75 | 'updated_at' => '2019-09-28 14:22:15',
76 | ],
77 | [
78 | 'id' => '12',
79 | 'title' => 'user_create',
80 | 'created_at' => '2019-09-28 14:22:15',
81 | 'updated_at' => '2019-09-28 14:22:15',
82 | ],
83 | [
84 | 'id' => '13',
85 | 'title' => 'user_edit',
86 | 'created_at' => '2019-09-28 14:22:15',
87 | 'updated_at' => '2019-09-28 14:22:15',
88 | ],
89 | [
90 | 'id' => '14',
91 | 'title' => 'user_show',
92 | 'created_at' => '2019-09-28 14:22:15',
93 | 'updated_at' => '2019-09-28 14:22:15',
94 | ],
95 | [
96 | 'id' => '15',
97 | 'title' => 'user_delete',
98 | 'created_at' => '2019-09-28 14:22:15',
99 | 'updated_at' => '2019-09-28 14:22:15',
100 | ],
101 | [
102 | 'id' => '16',
103 | 'title' => 'user_access',
104 | 'created_at' => '2019-09-28 14:22:15',
105 | 'updated_at' => '2019-09-28 14:22:15',
106 | ],
107 | ];
108 |
109 | Permission::insert($permissions);
110 |
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/database/seeds/RoleUserTableSeeder.php:
--------------------------------------------------------------------------------
1 | roles()->sync(1);
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/database/seeds/RolesTableSeeder.php:
--------------------------------------------------------------------------------
1 | 1,
13 | 'title' => 'Admin',
14 | 'created_at' => '2019-09-28 14:22:15',
15 | 'updated_at' => '2019-09-28 14:22:15',
16 | ],
17 | [
18 | 'id' => 2,
19 | 'title' => 'User',
20 | 'created_at' => '2019-09-28 14:22:15',
21 | 'updated_at' => '2019-09-28 14:22:15',
22 | ],
23 | ];
24 |
25 | Role::insert($roles);
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/database/seeds/UsersTableSeeder.php:
--------------------------------------------------------------------------------
1 | 1,
13 | 'name' => 'Admin',
14 | 'email' => 'admin@admin.com',
15 | 'password' => '$2y$10$6an7csz5VY5vq/0qw/VJ0.YX4u4bHl6QKeoJT.Cqc.nncudsc70Hi',
16 | 'remember_token' => null,
17 | 'created_at' => '2019-09-28 14:22:15',
18 | 'updated_at' => '2019-09-28 14:22:15',
19 | ],
20 | ];
21 |
22 | User::insert($users);
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "npm run development -- --watch",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.19",
14 | "cross-env": "^5.1",
15 | "laravel-mix": "^4.0.7",
16 | "lodash": "^4.17.13",
17 | "resolve-url-loader": "^2.3.1",
18 | "sass": "^1.15.2",
19 | "sass-loader": "^7.1.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests/Unit
14 |
15 |
16 |
17 | ./tests/Feature
18 |
19 |
20 |
21 |
22 | ./app
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/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 | # Handle Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/public/a1ecc3b826d01251edddf29c3e4e1e97.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/a1ecc3b826d01251edddf29c3e4e1e97.woff
--------------------------------------------------------------------------------
/public/assets/36d50c1381fda7c71d12b6643cbe1ee0.svg:
--------------------------------------------------------------------------------
1 | module.exports = __webpack_public_path__ + "912ec66d7572ff821749319396470bde.svg";
--------------------------------------------------------------------------------
/public/assets/6d16f95495605c95172bc8c924720bff.svg:
--------------------------------------------------------------------------------
1 | module.exports = __webpack_public_path__ + "9c8e96ecc7fa01e6ebcd196495ed2db5.svg";
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/fontawesome/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/fontawesome/FontAwesome.otf
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/fontawesome/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/themify/themify.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/themify/themify.eot
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/themify/themify.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/themify/themify.ttf
--------------------------------------------------------------------------------
/public/assets/static/fonts/icons/themify/themify.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/fonts/icons/themify/themify.woff
--------------------------------------------------------------------------------
/public/assets/static/images/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/404.png
--------------------------------------------------------------------------------
/public/assets/static/images/500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/500.png
--------------------------------------------------------------------------------
/public/assets/static/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/bg.jpg
--------------------------------------------------------------------------------
/public/assets/static/images/datatables/sort_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/datatables/sort_asc.png
--------------------------------------------------------------------------------
/public/assets/static/images/datatables/sort_asc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/datatables/sort_asc_disabled.png
--------------------------------------------------------------------------------
/public/assets/static/images/datatables/sort_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/datatables/sort_both.png
--------------------------------------------------------------------------------
/public/assets/static/images/datatables/sort_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/datatables/sort_desc.png
--------------------------------------------------------------------------------
/public/assets/static/images/datatables/sort_desc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/datatables/sort_desc_disabled.png
--------------------------------------------------------------------------------
/public/assets/static/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/assets/static/images/logo.png
--------------------------------------------------------------------------------
/public/assets/static/images/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/css/custom.css:
--------------------------------------------------------------------------------
1 | .ck-editor__editable,
2 | textarea {
3 | min-height: 150px;
4 | }
5 |
6 | .datatable {
7 | width: 100% !important;
8 | }
9 |
10 | .dataTables_length,
11 | .dataTables_filter,
12 | .dt-buttons {
13 | margin-bottom: 0.333em;
14 | margin-top: .2rem;
15 | }
16 |
17 | .dataTables_filter {
18 | margin-right: .2rem;
19 | }
20 |
21 | .dt-buttons .btn {
22 | margin-left: 0.333em;
23 | border-radius: 0;
24 | }
25 |
26 | .table.datatable {
27 | box-sizing: border-box;
28 | border-collapse: collapse;
29 | }
30 |
31 | table.dataTable thead th {
32 | border-bottom: 2px solid #c8ced3;
33 | }
34 |
35 | .dataTables_wrapper.no-footer .dataTables_scrollBody {
36 | border-bottom: 1px solid #c8ced3;
37 | }
38 |
39 | .select2 {
40 | max-width: 100%;
41 | width: 100% !important;
42 | }
43 |
44 | .select2-selection__rendered {
45 | padding-bottom: 5px !important;
46 | }
47 |
48 | .has-error .invalid-feedback {
49 | display: block !important;
50 | }
51 |
52 | .btn-info,
53 | .badge-info {
54 | color: white;
55 | }
56 |
57 | table.dataTable thead .sorting,
58 | table.dataTable thead .sorting_asc,
59 | table.dataTable thead .sorting_desc {
60 | background-image: none;
61 | }
62 |
63 | .sidebar .nav-item {
64 | cursor: pointer;
65 | }
66 |
67 | .btn-default {
68 | color: #23282c;
69 | background-color: #f0f3f5;
70 | border-color: #f0f3f5;
71 | }
72 |
73 | .btn-default.focus,
74 | .btn-default:focus {
75 | box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
76 | }
77 |
78 | .btn-default:hover {
79 | color: #23282c;
80 | background-color: #d9e1e6;
81 | border-color: #d1dbe1;
82 | }
83 |
84 | .btn-group-xs > .btn,
85 | .btn-xs {
86 | padding: 1px 5px;
87 | font-size: 12px;
88 | line-height: 1.5;
89 | border-radius: 3px;
90 | }
91 |
92 | .searchable-title {
93 | font-weight: bold;
94 | }
95 |
96 | .searchable-fields {
97 | padding-left: 5px;
98 | }
99 |
100 | .searchable-link {
101 | padding: 0 5px 0 5px;
102 | }
103 |
104 | .searchable-link:hover {
105 | cursor: pointer;
106 | background: #eaeaea;
107 | }
108 |
109 | .select2-results__option {
110 | padding-left: 0px;
111 | padding-right: 0px;
112 | }
113 |
114 | @font-face {
115 | font-family: 'themify';
116 | src: url('../a1ecc3b826d01251edddf29c3e4e1e97.woff') format('woff'),
117 | url('../e23a7dcaefbde4e74e263247aa42ecd7.ttf') format('ttf')
118 | }
119 |
120 | #loader {
121 | transition: all .3s ease-in-out;
122 | opacity: 1;
123 | visibility: visible;
124 | position: fixed;
125 | height: 100vh;
126 | width: 100%;
127 | background: #fff;
128 | z-index: 90000
129 | }
130 |
131 | #loader.fadeOut {
132 | opacity: 0;
133 | visibility: hidden
134 | }
135 |
136 | .spinner {
137 | width: 40px;
138 | height: 40px;
139 | position: absolute;
140 | top: calc(50% - 20px);
141 | left: calc(50% - 20px);
142 | background-color: #333;
143 | border-radius: 100%;
144 | -webkit-animation: sk-scaleout 1s infinite ease-in-out;
145 | animation: sk-scaleout 1s infinite ease-in-out
146 | }
147 |
148 | @-webkit-keyframes sk-scaleout {
149 | 0% {
150 | -webkit-transform: scale(0)
151 | }
152 | 100% {
153 | -webkit-transform: scale(1);
154 | opacity: 0
155 | }
156 | }
157 |
158 | @keyframes sk-scaleout {
159 | 0% {
160 | -webkit-transform: scale(0);
161 | transform: scale(0)
162 | }
163 | 100% {
164 | -webkit-transform: scale(1);
165 | transform: scale(1);
166 | opacity: 0
167 | }
168 | }
169 |
170 | .dataTables_wrapper .dataTables_length select {
171 | padding: .375rem 1.75rem .375rem .75rem !important;
172 | }
173 |
--------------------------------------------------------------------------------
/public/e23a7dcaefbde4e74e263247aa42ecd7.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/e23a7dcaefbde4e74e263247aa42ecd7.ttf
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-Adminator-QuickAdminPanel/46486a20ce2040f07632b16a83b458973f21f6b0/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | define('LARAVEL_START', microtime(true));
11 |
12 | /*
13 | |--------------------------------------------------------------------------
14 | | Register The Auto Loader
15 | |--------------------------------------------------------------------------
16 | |
17 | | Composer provides a convenient, automatically generated class loader for
18 | | our application. We just need to utilize it! We'll simply require it
19 | | into the script here so that we don't have to worry about manual
20 | | loading any of our classes later on. It feels great to relax.
21 | |
22 | */
23 |
24 | require __DIR__.'/../vendor/autoload.php';
25 |
26 | /*
27 | |--------------------------------------------------------------------------
28 | | Turn On The Lights
29 | |--------------------------------------------------------------------------
30 | |
31 | | We need to illuminate PHP development, so let us turn on the lights.
32 | | This bootstraps the framework and gets it ready for use, then it
33 | | will load up this application so that we can run it and send
34 | | the responses back to the browser and delight our users.
35 | |
36 | */
37 |
38 | $app = require_once __DIR__.'/../bootstrap/app.php';
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Run The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once we have the application, we can handle the incoming request
46 | | through the kernel, and send the associated response back to
47 | | the client's browser allowing them to enjoy the creative
48 | | and wonderful application we have prepared for them.
49 | |
50 | */
51 |
52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
53 |
54 | $response = $kernel->handle(
55 | $request = Illuminate\Http\Request::capture()
56 | );
57 |
58 | $response->send();
59 |
60 | $kernel->terminate($request, $response);
61 |
--------------------------------------------------------------------------------
/public/js/main.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | window._token = $('meta[name="csrf-token"]').attr('content')
3 |
4 | var allEditors = document.querySelectorAll('.ckeditor');
5 | for (var i = 0; i < allEditors.length; ++i) {
6 | ClassicEditor.create(
7 | allEditors[i],
8 | {
9 | removePlugins: ['ImageUpload']
10 | }
11 | );
12 | }
13 |
14 | moment.updateLocale('en', {
15 | week: {dow: 1} // Monday is the first day of the week
16 | })
17 |
18 | $('.date').datetimepicker({
19 | format: 'YYYY-MM-DD',
20 | locale: 'en'
21 | })
22 |
23 | $('.datetime').datetimepicker({
24 | format: 'YYYY-MM-DD HH:mm:ss',
25 | locale: 'en',
26 | sideBySide: true
27 | })
28 |
29 | $('.timepicker').datetimepicker({
30 | format: 'HH:mm:ss'
31 | })
32 |
33 | $('.select-all').click(function () {
34 | let $select2 = $(this).parent().siblings('.select2')
35 | $select2.find('option').prop('selected', 'selected')
36 | $select2.trigger('change')
37 | })
38 | $('.deselect-all').click(function () {
39 | let $select2 = $(this).parent().siblings('.select2')
40 | $select2.find('option').prop('selected', '')
41 | $select2.trigger('change')
42 | })
43 |
44 | $('.select2').select2()
45 |
46 | $('.treeview').each(function () {
47 | var shouldExpand = false
48 | $(this).find('li').each(function () {
49 | if ($(this).hasClass('active')) {
50 | shouldExpand = true
51 | }
52 | })
53 | if (shouldExpand) {
54 | $(this).addClass('active')
55 | }
56 | })
57 | })
58 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/resources/js/app.js:
--------------------------------------------------------------------------------
1 | require('./bootstrap');
2 |
--------------------------------------------------------------------------------
/resources/js/bootstrap.js:
--------------------------------------------------------------------------------
1 | window._ = require('lodash');
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 | window.axios = require('axios');
10 |
11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
12 |
13 | /**
14 | * Echo exposes an expressive API for subscribing to channels and listening
15 | * for events that are broadcast by Laravel. Echo and event broadcasting
16 | * allows your team to easily build robust real-time web applications.
17 | */
18 |
19 | // import Echo from 'laravel-echo';
20 |
21 | // window.Pusher = require('pusher-js');
22 |
23 | // window.Echo = new Echo({
24 | // broadcaster: 'pusher',
25 | // key: process.env.MIX_PUSHER_APP_KEY,
26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER,
27 | // encrypted: true
28 | // });
29 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
5 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
6 | ];
7 |
--------------------------------------------------------------------------------
/resources/lang/en/cruds.php:
--------------------------------------------------------------------------------
1 | [
5 | 'title' => 'Permissions',
6 | 'title_singular' => 'Permission',
7 | 'fields' => [
8 | 'id' => 'ID',
9 | 'id_helper' => '',
10 | 'title' => 'Title',
11 | 'title_helper' => '',
12 | 'created_at' => 'Created at',
13 | 'created_at_helper' => '',
14 | 'updated_at' => 'Updated at',
15 | 'updated_at_helper' => '',
16 | 'deleted_at' => 'Deleted at',
17 | 'deleted_at_helper' => '',
18 | ],
19 | ],
20 | 'role' => [
21 | 'title' => 'Roles',
22 | 'title_singular' => 'Role',
23 | 'fields' => [
24 | 'id' => 'ID',
25 | 'id_helper' => '',
26 | 'title' => 'Title',
27 | 'title_helper' => '',
28 | 'permissions' => 'Permissions',
29 | 'permissions_helper' => '',
30 | 'created_at' => 'Created at',
31 | 'created_at_helper' => '',
32 | 'updated_at' => 'Updated at',
33 | 'updated_at_helper' => '',
34 | 'deleted_at' => 'Deleted at',
35 | 'deleted_at_helper' => '',
36 | ],
37 | ],
38 | 'userManagement' => [
39 | 'title' => 'User Management',
40 | 'title_singular' => 'User Management',
41 | ],
42 | 'user' => [
43 | 'title' => 'Users',
44 | 'title_singular' => 'User',
45 | 'fields' => [
46 | 'id' => 'ID',
47 | 'id_helper' => '',
48 | 'name' => 'Name',
49 | 'name_helper' => '',
50 | 'email' => 'Email',
51 | 'email_helper' => '',
52 | 'email_verified_at' => 'Email verified at',
53 | 'email_verified_at_helper' => '',
54 | 'password' => 'Password',
55 | 'password_helper' => '',
56 | 'roles' => 'Roles',
57 | 'roles_helper' => '',
58 | 'remember_token' => 'Remember Token',
59 | 'remember_token_helper' => '',
60 | 'created_at' => 'Created at',
61 | 'created_at_helper' => '',
62 | 'updated_at' => 'Updated at',
63 | 'updated_at_helper' => '',
64 | 'deleted_at' => 'Deleted at',
65 | 'deleted_at_helper' => '',
66 | ],
67 | ],
68 | ];
69 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
5 | 'next' => 'Next »',
6 | ];
7 |
--------------------------------------------------------------------------------
/resources/lang/en/panel.php:
--------------------------------------------------------------------------------
1 | 'adminator',
5 | ];
6 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
5 | 'reset' => 'Your password has been reset!',
6 | 'sent' => 'We have e-mailed your password reset link!',
7 | 'token' => 'This password reset token is invalid.',
8 | 'user' => 'We can\'t find a user with that e-mail address.',
9 | 'updated' => 'Your password has been changed!',
10 | ];
11 |
--------------------------------------------------------------------------------
/resources/lang/en/validation.php:
--------------------------------------------------------------------------------
1 | 'The :attribute must be accepted.',
5 | 'active_url' => 'The :attribute is not a valid URL.',
6 | 'after' => 'The :attribute must be a date after :date.',
7 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
8 | 'alpha' => 'The :attribute may only contain letters.',
9 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
10 | 'alpha_num' => 'The :attribute may only contain letters and numbers.',
11 | 'latin' => 'The :attribute may only contain ISO basic Latin alphabet letters.',
12 | 'array' => 'The :attribute must be an array.',
13 | 'before' => 'The :attribute must be a date before :date.',
14 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
15 | 'between' => [
16 | 'numeric' => 'The :attribute must be between :min and :max.',
17 | 'file' => 'The :attribute must be between :min and :max kilobytes.',
18 | 'string' => 'The :attribute must be between :min and :max characters.',
19 | 'array' => 'The :attribute must have between :min and :max items.',
20 | ],
21 | 'boolean' => 'The :attribute field must be true or false.',
22 | 'confirmed' => 'The :attribute confirmation does not match.',
23 | 'date' => 'The :attribute is not a valid date.',
24 | 'date_format' => 'The :attribute does not match the format :format.',
25 | 'different' => 'The :attribute and :other must be different.',
26 | 'digits' => 'The :attribute must be :digits digits.',
27 | 'digits_between' => 'The :attribute must be between :min and :max digits.',
28 | 'dimensions' => 'The :attribute has invalid image dimensions.',
29 | 'distinct' => 'The :attribute field has a duplicate value.',
30 | 'email' => 'The :attribute must be a valid email address.',
31 | 'exists' => 'The selected :attribute is invalid.',
32 | 'file' => 'The :attribute must be a file.',
33 | 'filled' => 'The :attribute field must have a value.',
34 | 'gt' => [
35 | 'numeric' => 'The :attribute must be greater than :value.',
36 | 'file' => 'The :attribute must be greater than :value kilobytes.',
37 | 'string' => 'The :attribute must be greater than :value characters.',
38 | 'array' => 'The :attribute must have more than :value items.',
39 | ],
40 | 'gte' => [
41 | 'numeric' => 'The :attribute must be greater than or equal :value.',
42 | 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
43 | 'string' => 'The :attribute must be greater than or equal :value characters.',
44 | 'array' => 'The :attribute must have :value items or more.',
45 | ],
46 | 'image' => 'The :attribute must be an image.',
47 | 'in' => 'The selected :attribute is invalid.',
48 | 'in_array' => 'The :attribute field does not exist in :other.',
49 | 'integer' => 'The :attribute must be an integer.',
50 | 'ip' => 'The :attribute must be a valid IP address.',
51 | 'ipv4' => 'The :attribute must be a valid IPv4 address.',
52 | 'ipv6' => 'The :attribute must be a valid IPv6 address.',
53 | 'json' => 'The :attribute must be a valid JSON string.',
54 | 'lt' => [
55 | 'numeric' => 'The :attribute must be less than :value.',
56 | 'file' => 'The :attribute must be less than :value kilobytes.',
57 | 'string' => 'The :attribute must be less than :value characters.',
58 | 'array' => 'The :attribute must have less than :value items.',
59 | ],
60 | 'lte' => [
61 | 'numeric' => 'The :attribute must be less than or equal :value.',
62 | 'file' => 'The :attribute must be less than or equal :value kilobytes.',
63 | 'string' => 'The :attribute must be less than or equal :value characters.',
64 | 'array' => 'The :attribute must not have more than :value items.',
65 | ],
66 | 'max' => [
67 | 'numeric' => 'The :attribute may not be greater than :max.',
68 | 'file' => 'The :attribute may not be greater than :max kilobytes.',
69 | 'string' => 'The :attribute may not be greater than :max characters.',
70 | 'array' => 'The :attribute may not have more than :max items.',
71 | ],
72 | 'mimes' => 'The :attribute must be a file of type: :values.',
73 | 'mimetypes' => 'The :attribute must be a file of type: :values.',
74 | 'min' => [
75 | 'numeric' => 'The :attribute must be at least :min.',
76 | 'file' => 'The :attribute must be at least :min kilobytes.',
77 | 'string' => 'The :attribute must be at least :min characters.',
78 | 'array' => 'The :attribute must have at least :min items.',
79 | ],
80 | 'not_in' => 'The selected :attribute is invalid.',
81 | 'not_regex' => 'The :attribute format is invalid.',
82 | 'numeric' => 'The :attribute must be a number.',
83 | 'present' => 'The :attribute field must be present.',
84 | 'regex' => 'The :attribute format is invalid.',
85 | 'required' => 'The :attribute field is required.',
86 | 'required_if' => 'The :attribute field is required when :other is :value.',
87 | 'required_unless' => 'The :attribute field is required unless :other is in :values.',
88 | 'required_with' => 'The :attribute field is required when :values is present.',
89 | 'required_with_all' => 'The :attribute field is required when :values is present.',
90 | 'required_without' => 'The :attribute field is required when :values is not present.',
91 | 'required_without_all' => 'The :attribute field is required when none of :values are present.',
92 | 'same' => 'The :attribute and :other must match.',
93 | 'size' => [
94 | 'numeric' => 'The :attribute must be :size.',
95 | 'file' => 'The :attribute must be :size kilobytes.',
96 | 'string' => 'The :attribute must be :size characters.',
97 | 'array' => 'The :attribute must contain :size items.',
98 | ],
99 | 'string' => 'The :attribute must be a string.',
100 | 'timezone' => 'The :attribute must be a valid zone.',
101 | 'unique' => 'The :attribute has already been taken.',
102 | 'uploaded' => 'The :attribute failed to upload.',
103 | 'url' => 'The :attribute format is invalid.',
104 | 'custom' => [
105 | 'attribute-name' => [
106 | 'rule-name' => 'custom-message',
107 | ],
108 | ],
109 | 'reserved_word' => 'The :attribute contains reserved word',
110 | 'dont_allow_first_letter_number' => 'The \":input\" field can\'t have first letter as a number',
111 | 'exceeds_maximum_number' => 'The :attribute exceeds maximum model length',
112 | 'attributes' => [],
113 | ];
114 |
--------------------------------------------------------------------------------
/resources/sass/app.scss:
--------------------------------------------------------------------------------
1 | //
2 |
--------------------------------------------------------------------------------
/resources/views/admin/permissions/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.create') }} {{ trans('cruds.permission.title_singular') }}
5 |
6 |
26 | @endsection
27 |
--------------------------------------------------------------------------------
/resources/views/admin/permissions/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.edit') }} {{ trans('cruds.permission.title_singular') }}
5 |
6 |
27 | @endsection
28 |
--------------------------------------------------------------------------------
/resources/views/admin/permissions/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('cruds.permission.title_singular') }} {{ trans('global.list') }}
5 |
6 |
7 | @can('permission_create')
8 |
15 | @endcan
16 |
17 |
18 |
19 |
20 |
21 |
22 | |
23 |
24 | {{ trans('cruds.permission.fields.id') }}
25 | |
26 |
27 | {{ trans('cruds.permission.fields.title') }}
28 | |
29 |
30 |
31 | |
32 |
33 |
34 |
35 | @foreach($permissions as $key => $permission)
36 |
37 |
38 |
39 | |
40 |
41 | {{ $permission->id ?? '' }}
42 | |
43 |
44 | {{ $permission->title ?? '' }}
45 | |
46 |
47 | @can('permission_show')
48 |
49 | {{ trans('global.view') }}
50 |
51 | @endcan
52 |
53 | @can('permission_edit')
54 |
55 | {{ trans('global.edit') }}
56 |
57 | @endcan
58 |
59 | @can('permission_delete')
60 |
65 | @endcan
66 |
67 | |
68 |
69 |
70 | @endforeach
71 |
72 |
73 |
74 |
75 | @endsection
76 | @section('scripts')
77 | @parent
78 |
123 | @endsection
124 |
--------------------------------------------------------------------------------
/resources/views/admin/permissions/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.show') }} {{ trans('cruds.permission.title') }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{ trans('cruds.permission.fields.id') }}
13 | |
14 |
15 | {{ $permission->id }}
16 | |
17 |
18 |
19 |
20 | {{ trans('cruds.permission.fields.title') }}
21 | |
22 |
23 | {{ $permission->title }}
24 | |
25 |
26 |
27 |
28 |
29 | {{ trans('global.back_to_list') }}
30 |
31 |
32 |
33 | @endsection
34 |
--------------------------------------------------------------------------------
/resources/views/admin/roles/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.create') }} {{ trans('cruds.role.title_singular') }}
5 |
6 |
44 | @endsection
45 |
--------------------------------------------------------------------------------
/resources/views/admin/roles/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.edit') }} {{ trans('cruds.role.title_singular') }}
5 |
6 |
45 | @endsection
46 |
--------------------------------------------------------------------------------
/resources/views/admin/roles/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('cruds.role.title_singular') }} {{ trans('global.list') }}
5 |
6 |
7 | @can('role_create')
8 |
15 | @endcan
16 |
17 |
18 |
19 |
20 |
21 |
22 | |
23 |
24 | {{ trans('cruds.role.fields.id') }}
25 | |
26 |
27 | {{ trans('cruds.role.fields.title') }}
28 | |
29 |
30 | {{ trans('cruds.role.fields.permissions') }}
31 | |
32 |
33 |
34 | |
35 |
36 |
37 |
38 | @foreach($roles as $key => $role)
39 |
40 |
41 |
42 | |
43 |
44 | {{ $role->id ?? '' }}
45 | |
46 |
47 | {{ $role->title ?? '' }}
48 | |
49 |
50 | @foreach($role->permissions as $key => $item)
51 | {{ $item->title }}
52 | @endforeach
53 | |
54 |
55 | @can('role_show')
56 |
57 | {{ trans('global.view') }}
58 |
59 | @endcan
60 |
61 | @can('role_edit')
62 |
63 | {{ trans('global.edit') }}
64 |
65 | @endcan
66 |
67 | @can('role_delete')
68 |
73 | @endcan
74 |
75 | |
76 |
77 |
78 | @endforeach
79 |
80 |
81 |
82 |
83 | @endsection
84 | @section('scripts')
85 | @parent
86 |
131 | @endsection
132 |
--------------------------------------------------------------------------------
/resources/views/admin/roles/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.show') }} {{ trans('cruds.role.title') }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{ trans('cruds.role.fields.id') }}
13 | |
14 |
15 | {{ $role->id }}
16 | |
17 |
18 |
19 |
20 | {{ trans('cruds.role.fields.title') }}
21 | |
22 |
23 | {{ $role->title }}
24 | |
25 |
26 |
27 |
28 | Permissions
29 | |
30 |
31 | @foreach($role->permissions as $id => $permissions)
32 | {{ $permissions->title }}
33 | @endforeach
34 | |
35 |
36 |
37 |
38 |
39 | {{ trans('global.back_to_list') }}
40 |
41 |
42 |
43 | @endsection
44 |
--------------------------------------------------------------------------------
/resources/views/admin/users/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.create') }} {{ trans('cruds.user.title_singular') }}
5 |
6 |
68 | @endsection
69 |
--------------------------------------------------------------------------------
/resources/views/admin/users/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.edit') }} {{ trans('cruds.user.title_singular') }}
5 |
6 |
69 | @endsection
70 |
--------------------------------------------------------------------------------
/resources/views/admin/users/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('cruds.user.title_singular') }} {{ trans('global.list') }}
5 |
6 |
7 | @can('user_create')
8 |
15 | @endcan
16 |
17 |
18 |
19 |
20 |
21 |
22 | |
23 |
24 | {{ trans('cruds.user.fields.id') }}
25 | |
26 |
27 | {{ trans('cruds.user.fields.name') }}
28 | |
29 |
30 | {{ trans('cruds.user.fields.email') }}
31 | |
32 |
33 | {{ trans('cruds.user.fields.email_verified_at') }}
34 | |
35 |
36 | {{ trans('cruds.user.fields.roles') }}
37 | |
38 |
39 |
40 | |
41 |
42 |
43 |
44 | @foreach($users as $key => $user)
45 |
46 |
47 |
48 | |
49 |
50 | {{ $user->id ?? '' }}
51 | |
52 |
53 | {{ $user->name ?? '' }}
54 | |
55 |
56 | {{ $user->email ?? '' }}
57 | |
58 |
59 | {{ $user->email_verified_at ?? '' }}
60 | |
61 |
62 | @foreach($user->roles as $key => $item)
63 | {{ $item->title }}
64 | @endforeach
65 | |
66 |
67 | @can('user_show')
68 |
69 | {{ trans('global.view') }}
70 |
71 | @endcan
72 |
73 | @can('user_edit')
74 |
75 | {{ trans('global.edit') }}
76 |
77 | @endcan
78 |
79 | @can('user_delete')
80 |
85 | @endcan
86 |
87 | |
88 |
89 |
90 | @endforeach
91 |
92 |
93 |
94 |
95 | @endsection
96 | @section('scripts')
97 | @parent
98 |
143 | @endsection
144 |
--------------------------------------------------------------------------------
/resources/views/admin/users/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | {{ trans('global.show') }} {{ trans('cruds.user.title') }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{ trans('cruds.user.fields.id') }}
13 | |
14 |
15 | {{ $user->id }}
16 | |
17 |
18 |
19 |
20 | {{ trans('cruds.user.fields.name') }}
21 | |
22 |
23 | {{ $user->name }}
24 | |
25 |
26 |
27 |
28 | {{ trans('cruds.user.fields.email') }}
29 | |
30 |
31 | {{ $user->email }}
32 | |
33 |
34 |
35 |
36 | {{ trans('cruds.user.fields.email_verified_at') }}
37 | |
38 |
39 | {{ $user->email_verified_at }}
40 | |
41 |
42 |
43 |
44 | Roles
45 | |
46 |
47 | @foreach($user->roles as $id => $roles)
48 | {{ $roles->title }}
49 | @endforeach
50 | |
51 |
52 |
53 |
54 |
55 | {{ trans('global.back_to_list') }}
56 |
57 |
58 |
59 | @endsection
60 |
--------------------------------------------------------------------------------
/resources/views/auth/login.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 | @section('content')
3 |
4 | {{ trans('global.login') }}
5 |
6 | @if(\Session::has('message'))
7 |
8 | {{ \Session::get('message') }}
9 |
10 | @endif
11 |
62 | @endsection
63 |
--------------------------------------------------------------------------------
/resources/views/auth/passwords/email.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 | @section('content')
3 |
4 | {{ trans('global.reset_password') }}
5 |
6 | @if(\Session::has('message'))
7 |
8 | {{ \Session::get('message') }}
9 |
10 | @endif
11 |
33 | @endsection
34 |
--------------------------------------------------------------------------------
/resources/views/auth/passwords/reset.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 | @section('content')
3 |
4 | {{ trans('global.reset_password') }}
5 |
6 | @if(\Session::has('message'))
7 |
8 | {{ \Session::get('message') }}
9 |
10 | @endif
11 |
56 | @endsection
57 |
--------------------------------------------------------------------------------
/resources/views/home.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 | Home
5 |
6 |
7 | @endsection
8 | @section('scripts')
9 | @parent
10 |
11 | @endsection
12 |
--------------------------------------------------------------------------------
/resources/views/layouts/admin.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ trans('panel.site_title') }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | @yield('styles')
22 |
23 |
24 |
27 |
35 | @include('partials.menu')
36 |
37 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | @if(session('message'))
70 |
71 |
72 |
{{ session('message') }}
73 |
74 |
75 | @endif
76 | @if($errors->count() > 0)
77 |
78 |
79 | @foreach($errors->all() as $error)
80 | - {{ $error }}
81 | @endforeach
82 |
83 |
84 | @endif
85 | @yield('content')
86 |
87 |
88 |
89 |
90 |
91 |
92 |
95 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
210 | @yield('scripts')
211 |
212 |
213 |
--------------------------------------------------------------------------------
/resources/views/layouts/app.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ trans('panel.site_title') }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | @yield('styles')
21 |
22 |
23 |
24 |
27 |
35 |
36 |
37 |
38 |
39 |

40 |
41 |
42 |
43 |
44 | @yield("content")
45 |
46 |
47 |
48 |
49 | @yield('scripts')
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/resources/views/partials/menu.blade.php:
--------------------------------------------------------------------------------
1 |
97 |
--------------------------------------------------------------------------------
/resources/views/welcome.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Laravel
8 |
9 |
10 |
11 |
12 |
13 |
65 |
66 |
67 |
68 | @if (Route::has('login'))
69 |
70 | @auth
71 |
Home
72 | @else
73 |
Login
74 |
75 | @if (Route::has('register'))
76 |
Register
77 | @endif
78 | @endauth
79 |
80 | @endif
81 |
82 |
83 |
84 | Laravel
85 |
86 |
87 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | 'v1', 'as' => 'api.', 'namespace' => 'Api\V1\Admin', 'middleware' => ['auth:api']], function () {
4 | // Permissions
5 | Route::apiResource('permissions', 'PermissionsApiController');
6 |
7 | // Roles
8 | Route::apiResource('roles', 'RolesApiController');
9 |
10 | // Users
11 | Route::apiResource('users', 'UsersApiController');
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
16 | });
17 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
18 | })->describe('Display an inspiring quote');
19 |
--------------------------------------------------------------------------------
/routes/web.php:
--------------------------------------------------------------------------------
1 | false]);
6 |
7 | Route::group(['prefix' => 'admin', 'as' => 'admin.', 'namespace' => 'Admin', 'middleware' => ['auth']], function () {
8 | Route::get('/', 'HomeController@index')->name('home');
9 | // Permissions
10 | Route::delete('permissions/destroy', 'PermissionsController@massDestroy')->name('permissions.massDestroy');
11 | Route::resource('permissions', 'PermissionsController');
12 |
13 | // Roles
14 | Route::delete('roles/destroy', 'RolesController@massDestroy')->name('roles.massDestroy');
15 | Route::resource('roles', 'RolesController');
16 |
17 | // Users
18 | Route::delete('users/destroy', 'UsersController@massDestroy')->name('users.massDestroy');
19 | Route::resource('users', 'UsersController');
20 |
21 | });
22 |
--------------------------------------------------------------------------------
/server.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | $uri = urldecode(
11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 | );
13 |
14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 | // built-in PHP web server. This provides a convenient way to test a Laravel
16 | // application without having installed a "real" web server software here.
17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 | return false;
19 | }
20 |
21 | require_once __DIR__.'/public/index.php';
22 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | config.php
2 | routes.php
3 | schedule-*
4 | compiled.php
5 | services.json
6 | events.scanned.php
7 | routes.scanned.php
8 | down
9 |
--------------------------------------------------------------------------------
/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/Browser/PermissionsTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
15 | $browser->loginAs($admin);
16 | $browser->visit(route('admin.permissions.index'));
17 | $browser->assertRouteIs('admin.permissions.index');
18 | });
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/Browser/RolesTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
15 | $browser->loginAs($admin);
16 | $browser->visit(route('admin.roles.index'));
17 | $browser->assertRouteIs('admin.roles.index');
18 | });
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/Browser/UsersTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
15 | $browser->loginAs($admin);
16 | $browser->visit(route('admin.users.index'));
17 | $browser->assertRouteIs('admin.users.index');
18 | });
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
19 |
20 | return $app;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
18 |
19 | $response->assertStatus(200);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class))->bootstrap();
26 |
27 | foreach ($commands as $command) {
28 | $console->call($command);
29 | }
30 |
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | const mix = require('laravel-mix');
2 |
3 | /*
4 | |--------------------------------------------------------------------------
5 | | Mix Asset Management
6 | |--------------------------------------------------------------------------
7 | |
8 | | Mix provides a clean, fluent API for defining some Webpack build steps
9 | | for your Laravel application. By default, we are compiling the Sass
10 | | file for the application as well as bundling up all the JS files.
11 | |
12 | */
13 |
14 | mix.js('resources/js/app.js', 'public/js')
15 | .sass('resources/sass/app.scss', 'public/css');
16 |
--------------------------------------------------------------------------------