├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── HomeController.php │ │ │ ├── PermissionsController.php │ │ │ ├── ProductsController.php │ │ │ ├── RolesController.php │ │ │ └── UsersController.php │ │ ├── Api │ │ │ └── V1 │ │ │ │ └── Admin │ │ │ │ ├── PermissionsApiController.php │ │ │ │ ├── ProductsApiController.php │ │ │ │ ├── RolesApiController.php │ │ │ │ └── UsersApiController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ └── HomeController.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 │ │ ├── MassDestroyProductRequest.php │ │ ├── MassDestroyRoleRequest.php │ │ ├── MassDestroyUserRequest.php │ │ ├── StorePermissionRequest.php │ │ ├── StoreProductRequest.php │ │ ├── StoreRoleRequest.php │ │ ├── StoreUserRequest.php │ │ ├── UpdatePermissionRequest.php │ │ ├── UpdateProductRequest.php │ │ ├── UpdateRoleRequest.php │ │ └── UpdateUserRequest.php ├── Permission.php ├── Product.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 ├── bugsnag.php ├── cache.php ├── database.php ├── datatables.php ├── debug-server.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── panel.php ├── queue.php ├── services.php ├── session.php ├── tinker.php ├── trustedproxy.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_04_15_191331679173_create_1555355612601_permissions_table.php │ ├── 2019_04_15_191331731390_create_1555355612581_roles_table.php │ ├── 2019_04_15_191331779537_create_1555355612782_users_table.php │ ├── 2019_04_15_191332603432_create_1555355612603_permission_role_pivot_table.php │ ├── 2019_04_15_191332791021_create_1555355612790_role_user_pivot_table.php │ ├── 2019_04_15_191441675085_create_1555355681975_products_table.php │ └── 2019_08_19_000000_create_failed_jobs_table.php └── seeds │ ├── DatabaseSeeder.php │ ├── PermissionRoleTableSeeder.php │ ├── PermissionsTableSeeder.php │ ├── RoleUserTableSeeder.php │ ├── RolesTableSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ ├── adminltev3.css │ ├── app.css │ └── custom.css ├── favicon.ico ├── index.php ├── js │ ├── app.js │ └── main.js └── robots.txt ├── readme.md ├── resources ├── js │ ├── app.js │ ├── bootstrap.js │ └── components │ │ └── ExampleComponent.vue ├── lang │ └── en │ │ ├── auth.php │ │ ├── global.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── admin │ ├── permissions │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── products │ │ ├── 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 │ ├── userManagements │ │ ├── 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 │ ├── register.blade.php │ └── verify.blade.php │ ├── errors │ ├── 401.blade.php │ ├── 403.blade.php │ ├── 404.blade.php │ ├── 419.blade.php │ ├── 429.blade.php │ ├── 500.blade.php │ ├── 503.blade.php │ ├── illustrated-layout.blade.php │ ├── layout.blade.php │ └── minimal.blade.php │ ├── home.blade.php │ ├── layouts │ ├── admin.blade.php │ └── app.blade.php │ ├── partials │ └── menu.blade.php │ ├── vendor │ ├── mail │ │ ├── html │ │ │ ├── button.blade.php │ │ │ ├── footer.blade.php │ │ │ ├── header.blade.php │ │ │ ├── layout.blade.php │ │ │ ├── message.blade.php │ │ │ ├── panel.blade.php │ │ │ ├── promotion.blade.php │ │ │ ├── promotion │ │ │ │ └── button.blade.php │ │ │ ├── subcopy.blade.php │ │ │ ├── table.blade.php │ │ │ └── themes │ │ │ │ └── default.css │ │ └── text │ │ │ ├── button.blade.php │ │ │ ├── footer.blade.php │ │ │ ├── header.blade.php │ │ │ ├── layout.blade.php │ │ │ ├── message.blade.php │ │ │ ├── panel.blade.php │ │ │ ├── promotion.blade.php │ │ │ ├── promotion │ │ │ └── button.blade.php │ │ │ ├── subcopy.blade.php │ │ │ └── table.blade.php │ ├── notifications │ │ └── email.blade.php │ └── pagination │ │ ├── bootstrap-4.blade.php │ │ ├── default.blade.php │ │ ├── semantic-ui.blade.php │ │ ├── simple-bootstrap-4.blade.php │ │ └── simple-default.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 │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── Browser │ ├── PermissionsTest.php │ ├── ProductsTest.php │ ├── RolesTest.php │ └── UsersTest.php ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php ├── webpack.mix.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.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=homestead 13 | DB_USERNAME=homestead 14 | DB_PASSWORD=secret 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 | /.idea 7 | /.vscode 8 | /nbproject 9 | /.vagrant 10 | .env 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | npm-debug.log 15 | yarn-error.log 16 | -------------------------------------------------------------------------------- /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()); 34 | 35 | return redirect()->route('admin.permissions.index'); 36 | } 37 | 38 | public function edit(Permission $permission) 39 | { 40 | abort_unless(\Gate::allows('permission_edit'), 403); 41 | 42 | return view('admin.permissions.edit', compact('permission')); 43 | } 44 | 45 | public function update(UpdatePermissionRequest $request, Permission $permission) 46 | { 47 | abort_unless(\Gate::allows('permission_edit'), 403); 48 | 49 | $permission->update($request->all()); 50 | 51 | return redirect()->route('admin.permissions.index'); 52 | } 53 | 54 | public function show(Permission $permission) 55 | { 56 | abort_unless(\Gate::allows('permission_show'), 403); 57 | 58 | return view('admin.permissions.show', compact('permission')); 59 | } 60 | 61 | public function destroy(Permission $permission) 62 | { 63 | abort_unless(\Gate::allows('permission_delete'), 403); 64 | 65 | $permission->delete(); 66 | 67 | return back(); 68 | } 69 | 70 | public function massDestroy(MassDestroyPermissionRequest $request) 71 | { 72 | Permission::whereIn('id', request('ids'))->delete(); 73 | 74 | return response(null, 204); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/ProductsController.php: -------------------------------------------------------------------------------- 1 | all()); 34 | 35 | return redirect()->route('admin.products.index'); 36 | } 37 | 38 | public function edit(Product $product) 39 | { 40 | abort_unless(\Gate::allows('product_edit'), 403); 41 | 42 | return view('admin.products.edit', compact('product')); 43 | } 44 | 45 | public function update(UpdateProductRequest $request, Product $product) 46 | { 47 | abort_unless(\Gate::allows('product_edit'), 403); 48 | 49 | $product->update($request->all()); 50 | 51 | return redirect()->route('admin.products.index'); 52 | } 53 | 54 | public function show(Product $product) 55 | { 56 | abort_unless(\Gate::allows('product_show'), 403); 57 | 58 | return view('admin.products.show', compact('product')); 59 | } 60 | 61 | public function destroy(Product $product) 62 | { 63 | abort_unless(\Gate::allows('product_delete'), 403); 64 | 65 | $product->delete(); 66 | 67 | return back(); 68 | } 69 | 70 | public function massDestroy(MassDestroyProductRequest $request) 71 | { 72 | Product::whereIn('id', request('ids'))->delete(); 73 | 74 | return response(null, 204); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/RolesController.php: -------------------------------------------------------------------------------- 1 | pluck('title', 'id'); 28 | 29 | return view('admin.roles.create', compact('permissions')); 30 | } 31 | 32 | public function store(StoreRoleRequest $request) 33 | { 34 | abort_unless(\Gate::allows('role_create'), 403); 35 | 36 | $role = Role::create($request->all()); 37 | $role->permissions()->sync($request->input('permissions', [])); 38 | 39 | return redirect()->route('admin.roles.index'); 40 | } 41 | 42 | public function edit(Role $role) 43 | { 44 | abort_unless(\Gate::allows('role_edit'), 403); 45 | 46 | $permissions = Permission::all()->pluck('title', 'id'); 47 | 48 | $role->load('permissions'); 49 | 50 | return view('admin.roles.edit', compact('permissions', 'role')); 51 | } 52 | 53 | public function update(UpdateRoleRequest $request, Role $role) 54 | { 55 | abort_unless(\Gate::allows('role_edit'), 403); 56 | 57 | $role->update($request->all()); 58 | $role->permissions()->sync($request->input('permissions', [])); 59 | 60 | return redirect()->route('admin.roles.index'); 61 | } 62 | 63 | public function show(Role $role) 64 | { 65 | abort_unless(\Gate::allows('role_show'), 403); 66 | 67 | $role->load('permissions'); 68 | 69 | return view('admin.roles.show', compact('role')); 70 | } 71 | 72 | public function destroy(Role $role) 73 | { 74 | abort_unless(\Gate::allows('role_delete'), 403); 75 | 76 | $role->delete(); 77 | 78 | return back(); 79 | } 80 | 81 | public function massDestroy(MassDestroyRoleRequest $request) 82 | { 83 | Role::whereIn('id', request('ids'))->delete(); 84 | 85 | return response(null, 204); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/UsersController.php: -------------------------------------------------------------------------------- 1 | pluck('title', 'id'); 28 | 29 | return view('admin.users.create', compact('roles')); 30 | } 31 | 32 | public function store(StoreUserRequest $request) 33 | { 34 | abort_unless(\Gate::allows('user_create'), 403); 35 | 36 | $user = User::create($request->all()); 37 | $user->roles()->sync($request->input('roles', [])); 38 | 39 | return redirect()->route('admin.users.index'); 40 | } 41 | 42 | public function edit(User $user) 43 | { 44 | abort_unless(\Gate::allows('user_edit'), 403); 45 | 46 | $roles = Role::all()->pluck('title', 'id'); 47 | 48 | $user->load('roles'); 49 | 50 | return view('admin.users.edit', compact('roles', 'user')); 51 | } 52 | 53 | public function update(UpdateUserRequest $request, User $user) 54 | { 55 | abort_unless(\Gate::allows('user_edit'), 403); 56 | 57 | $user->update($request->all()); 58 | $user->roles()->sync($request->input('roles', [])); 59 | 60 | return redirect()->route('admin.users.index'); 61 | } 62 | 63 | public function show(User $user) 64 | { 65 | abort_unless(\Gate::allows('user_show'), 403); 66 | 67 | $user->load('roles'); 68 | 69 | return view('admin.users.show', compact('user')); 70 | } 71 | 72 | public function destroy(User $user) 73 | { 74 | abort_unless(\Gate::allows('user_delete'), 403); 75 | 76 | $user->delete(); 77 | 78 | return back(); 79 | } 80 | 81 | public function massDestroy(MassDestroyUserRequest $request) 82 | { 83 | User::whereIn('id', request('ids'))->delete(); 84 | 85 | return response(null, 204); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/Admin/PermissionsApiController.php: -------------------------------------------------------------------------------- 1 | all()); 22 | } 23 | 24 | public function update(UpdatePermissionRequest $request, Permission $permission) 25 | { 26 | return $permission->update($request->all()); 27 | } 28 | 29 | public function show(Permission $permission) 30 | { 31 | return $permission; 32 | } 33 | 34 | public function destroy(Permission $permission) 35 | { 36 | return $permission->delete(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/Admin/ProductsApiController.php: -------------------------------------------------------------------------------- 1 | all()); 22 | } 23 | 24 | public function update(UpdateProductRequest $request, Product $product) 25 | { 26 | return $product->update($request->all()); 27 | } 28 | 29 | public function show(Product $product) 30 | { 31 | return $product; 32 | } 33 | 34 | public function destroy(Product $product) 35 | { 36 | return $product->delete(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/Admin/RolesApiController.php: -------------------------------------------------------------------------------- 1 | all()); 22 | } 23 | 24 | public function update(UpdateRoleRequest $request, Role $role) 25 | { 26 | return $role->update($request->all()); 27 | } 28 | 29 | public function show(Role $role) 30 | { 31 | return $role; 32 | } 33 | 34 | public function destroy(Role $role) 35 | { 36 | return $role->delete(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/Admin/UsersApiController.php: -------------------------------------------------------------------------------- 1 | all()); 22 | } 23 | 24 | public function update(UpdateUserRequest $request, User $user) 25 | { 26 | return $user->update($request->all()); 27 | } 28 | 29 | public function show(User $user) 30 | { 31 | return $user; 32 | } 33 | 34 | public function destroy(User $user) 35 | { 36 | return $user->delete(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /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 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Contracts\Support\Renderable 23 | */ 24 | public function index() 25 | { 26 | return view('home'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'throttle:60,1', 20 | 'bindings', 21 | ], 22 | 'web' => [ 23 | \App\Http\Middleware\EncryptCookies::class, 24 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 25 | \Illuminate\Session\Middleware\StartSession::class, 26 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 27 | \App\Http\Middleware\VerifyCsrfToken::class, 28 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 29 | \App\Http\Middleware\AuthGates::class, 30 | \App\Http\Middleware\SetLocale::class, 31 | ], 32 | ]; 33 | 34 | protected $routeMiddleware = [ 35 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 36 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 37 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 38 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 39 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 40 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 41 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 42 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Middleware/AuthGates.php: -------------------------------------------------------------------------------- 1 | runningInConsole() && $user) { 16 | $roles = Role::with('permissions')->get(); 17 | 18 | foreach ($roles as $role) { 19 | foreach ($role->permissions as $permissions) { 20 | $permissionsArray[$permissions->title][] = $role->id; 21 | } 22 | } 23 | 24 | foreach ($permissionsArray as $title => $roles) { 25 | Gate::define($title, function (\App\User $user) use ($roles) { 26 | return count(array_intersect($user->roles->pluck('id')->toArray(), $roles)) > 0; 27 | }); 28 | } 29 | } 30 | 31 | return $next($request); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'required|array', 20 | 'ids.*' => 'exists:permissions,id', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/MassDestroyProductRequest.php: -------------------------------------------------------------------------------- 1 | 'required|array', 20 | 'ids.*' => 'exists:products,id', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/MassDestroyRoleRequest.php: -------------------------------------------------------------------------------- 1 | 'required|array', 20 | 'ids.*' => 'exists:roles,id', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/MassDestroyUserRequest.php: -------------------------------------------------------------------------------- 1 | 'required|array', 20 | 'ids.*' => 'exists:users,id', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/StorePermissionRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreProductRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreRoleRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | 'permissions.*' => [ 22 | 'integer', 23 | ], 24 | 'permissions' => [ 25 | 'required', 26 | 'array', 27 | ], 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreUserRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | 'email' => [ 22 | 'required', 23 | ], 24 | 'password' => [ 25 | 'required', 26 | ], 27 | 'roles.*' => [ 28 | 'integer', 29 | ], 30 | 'roles' => [ 31 | 'required', 32 | 'array', 33 | ], 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdatePermissionRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateProductRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateRoleRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | 'permissions.*' => [ 22 | 'integer', 23 | ], 24 | 'permissions' => [ 25 | 'required', 26 | 'array', 27 | ], 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateUserRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | 'email' => [ 22 | 'required', 23 | ], 24 | 'roles.*' => [ 25 | 'integer', 26 | ], 27 | 'roles' => [ 28 | 'required', 29 | 'array', 30 | ], 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Permission.php: -------------------------------------------------------------------------------- 1 | app->alias('bugsnag.logger', \Illuminate\Contracts\Logging\Log::class); 27 | $this->app->alias('bugsnag.logger', \Psr\Log\LoggerInterface::class); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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(Permission::class); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | format(config('panel.date_format') . ' ' . config('panel.time_format')) : null; 43 | } 44 | 45 | public function setEmailVerifiedAtAttribute($value) 46 | { 47 | $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; 48 | } 49 | 50 | public function setPasswordAttribute($input) 51 | { 52 | if ($input) { 53 | $this->attributes['password'] = app('hash')->needsRehash($input) ? Hash::make($input) : $input; 54 | } 55 | } 56 | 57 | public function sendPasswordResetNotification($token) 58 | { 59 | $this->notify(new ResetPassword($token)); 60 | } 61 | 62 | public function roles() 63 | { 64 | return $this->belongsToMany(Role::class); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /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 | "bugsnag/bugsnag-laravel": "^2.15", 13 | "doctrine/dbal": "^2.9", 14 | "fideloper/proxy": "^4.0", 15 | "laravel/framework": "^6.0", 16 | "laravel/tinker": "^1.0", 17 | "yajra/laravel-datatables-oracle": "~9.0" 18 | }, 19 | "require-dev": { 20 | "beyondcode/laravel-dump-server": "^1.0", 21 | "facade/ignition": "^1.4", 22 | "fzaninotto/faker": "^1.4", 23 | "laravel/dusk": "^5.0", 24 | "mockery/mockery": "^1.0", 25 | "nunomaduro/collision": "^3.0", 26 | "phpunit/phpunit": "^8.0" 27 | }, 28 | "config": { 29 | "optimize-autoloader": true, 30 | "preferred-install": "dist", 31 | "sort-packages": true 32 | }, 33 | "extra": { 34 | "laravel": { 35 | "dont-discover": [] 36 | } 37 | }, 38 | "autoload": { 39 | "psr-4": { 40 | "App\\": "app/" 41 | }, 42 | "classmap": [ 43 | "database/seeds", 44 | "database/factories" 45 | ] 46 | }, 47 | "autoload-dev": { 48 | "psr-4": { 49 | "Tests\\": "tests/" 50 | } 51 | }, 52 | "minimum-stability": "dev", 53 | "prefer-stable": true, 54 | "scripts": { 55 | "post-autoload-dump": [ 56 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 57 | "@php artisan package:discover --ansi" 58 | ], 59 | "post-root-package-install": [ 60 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 61 | ], 62 | "post-create-project-cmd": [ 63 | "@php artisan key:generate --ansi" 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /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' => 'token', 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 | 'encrypted' => 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 | ], 86 | 87 | ], 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Cache Key Prefix 92 | |-------------------------------------------------------------------------- 93 | | 94 | | When utilizing a RAM based store such as APC or Memcached, there might 95 | | be other applications utilizing the same cache. So, we'll specify a 96 | | value to get prefixed to all our keys so we can avoid collisions. 97 | | 98 | */ 99 | 100 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /config/datatables.php: -------------------------------------------------------------------------------- 1 | [ 8 | /* 9 | * Smart search will enclose search keyword with wildcard string "%keyword%". 10 | * SQL: column LIKE "%keyword%" 11 | */ 12 | 'smart' => true, 13 | 14 | /* 15 | * Multi-term search will explode search keyword using spaces resulting into multiple term search. 16 | */ 17 | 'multi_term' => true, 18 | 19 | /* 20 | * Case insensitive will search the keyword in lower case format. 21 | * SQL: LOWER(column) LIKE LOWER(keyword) 22 | */ 23 | 'case_insensitive' => true, 24 | 25 | /* 26 | * Wild card will add "%" in between every characters of the keyword. 27 | * SQL: column LIKE "%k%e%y%w%o%r%d%" 28 | */ 29 | 'use_wildcards' => false, 30 | ], 31 | 32 | /* 33 | * DataTables internal index id response column name. 34 | */ 35 | 'index_column' => 'DT_RowIndex', 36 | 37 | /* 38 | * List of available builders for DataTables. 39 | * This is where you can register your custom dataTables builder. 40 | */ 41 | 'engines' => [ 42 | 'eloquent' => \Yajra\DataTables\EloquentDataTable::class, 43 | 'query' => \Yajra\DataTables\QueryDataTable::class, 44 | 'collection' => \Yajra\DataTables\CollectionDataTable::class, 45 | 'resource' => \Yajra\DataTables\ApiResourceDataTable::class, 46 | ], 47 | 48 | /* 49 | * DataTables accepted builder to engine mapping. 50 | * This is where you can override which engine a builder should use 51 | * Note, only change this if you know what you are doing! 52 | */ 53 | 'builders' => [ 54 | //Illuminate\Database\Eloquent\Relations\Relation::class => 'eloquent', 55 | //Illuminate\Database\Eloquent\Builder::class => 'eloquent', 56 | //Illuminate\Database\Query\Builder::class => 'query', 57 | //Illuminate\Support\Collection::class => 'collection', 58 | ], 59 | 60 | /* 61 | * Nulls last sql pattern for Posgresql & Oracle. 62 | * For MySQL, use '-%s %s' 63 | */ 64 | 'nulls_last_sql' => '%s %s NULLS LAST', 65 | 66 | /* 67 | * User friendly message to be displayed on user if error occurs. 68 | * Possible values: 69 | * null - The exception message will be used on error response. 70 | * 'throw' - Throws a \Yajra\DataTables\Exceptions\Exception. Use your custom error handler if needed. 71 | * 'custom message' - Any friendly message to be displayed to the user. You can also use translation key. 72 | */ 73 | 'error' => env('DATATABLES_ERROR', null), 74 | 75 | /* 76 | * Default columns definition of dataTable utility functions. 77 | */ 78 | 'columns' => [ 79 | /* 80 | * List of columns hidden/removed on json response. 81 | */ 82 | 'excess' => ['rn', 'row_num'], 83 | 84 | /* 85 | * List of columns to be escaped. If set to *, all columns are escape. 86 | * Note: You can set the value to empty array to disable XSS protection. 87 | */ 88 | 'escape' => '*', 89 | 90 | /* 91 | * List of columns that are allowed to display html content. 92 | * Note: Adding columns to list will make us available to XSS attacks. 93 | */ 94 | 'raw' => ['action'], 95 | 96 | /* 97 | * List of columns are are forbidden from being searched/sorted. 98 | */ 99 | 'blacklist' => ['password', 'remember_token'], 100 | 101 | /* 102 | * List of columns that are only allowed fo search/sort. 103 | * If set to *, all columns are allowed. 104 | */ 105 | 'whitelist' => '*', 106 | ], 107 | 108 | /* 109 | * JsonResponse header and options config. 110 | */ 111 | 'json' => [ 112 | 'header' => [], 113 | 'options' => 0, 114 | ], 115 | 116 | ]; 117 | -------------------------------------------------------------------------------- /config/debug-server.php: -------------------------------------------------------------------------------- 1 | 'tcp://127.0.0.1:9912', 8 | ]; 9 | -------------------------------------------------------------------------------- /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", "rackspace" 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' => ['single', 'bugsnag'], 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 | 'bugsnag' => [ 94 | 'driver' => 'bugsnag', 95 | ], 96 | ], 97 | 98 | ]; 99 | -------------------------------------------------------------------------------- /config/panel.php: -------------------------------------------------------------------------------- 1 | 'Y-m-d', 5 | 'time_format' => 'H:i:s', 6 | 'primary_language' => 'en', 7 | 'available_languages' => [ 8 | 'en' => 'English', 9 | ], 10 | ]; 11 | -------------------------------------------------------------------------------- /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 | 'database' => env('DB_CONNECTION', 'mysql'), 84 | 'table' => 'failed_jobs', 85 | ], 86 | 87 | ]; 88 | -------------------------------------------------------------------------------- /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 | 'sparkpost' => [ 34 | 'secret' => env('SPARKPOST_SECRET'), 35 | ], 36 | 37 | 'stripe' => [ 38 | 'model' => App\User::class, 39 | 'key' => env('STRIPE_KEY'), 40 | 'secret' => env('STRIPE_SECRET'), 41 | 'webhook' => [ 42 | 'secret' => env('STRIPE_WEBHOOK_SECRET'), 43 | 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), 44 | ], 45 | ], 46 | 47 | ]; 48 | -------------------------------------------------------------------------------- /config/tinker.php: -------------------------------------------------------------------------------- 1 | [ 17 | // App\Console\Commands\ExampleCommand::class, 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Alias Blacklist 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Typically, Tinker automatically aliases classes as you require them in 26 | | Tinker. However, you may wish to never alias certain classes, which 27 | | you may accomplish by listing the classes in the following array. 28 | | 29 | */ 30 | 31 | 'dont_alias' => [], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/trustedproxy.php: -------------------------------------------------------------------------------- 1 | null, // [,], '*', ',' 19 | 20 | /* 21 | * To trust one or more specific proxies that connect 22 | * directly to your server, use an array or a string separated by comma of IP addresses: 23 | */ 24 | // 'proxies' => ['192.168.1.1'], 25 | // 'proxies' => '192.168.1.1, 192.168.1.2', 26 | 27 | /* 28 | * Or, to trust all proxies that connect 29 | * directly to your server, use a "*" 30 | */ 31 | // 'proxies' => '*', 32 | 33 | /* 34 | * Which headers to use to detect proxy related data (For, Host, Proto, Port) 35 | * 36 | * Options include: 37 | * 38 | * - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust) 39 | * - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust) 40 | * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer) 41 | * 42 | * - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust) 43 | * - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust) 44 | * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer) 45 | * 46 | * @link https://symfony.com/doc/current/deployment/proxies.html 47 | */ 48 | 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, 49 | 50 | ]; 51 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 19 | return [ 20 | 'name' => $faker->name, 21 | 'email' => $faker->unique()->safeEmail, 22 | 'email_verified_at' => now(), 23 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 24 | 'remember_token' => Str::random(10), 25 | ]; 26 | }); 27 | -------------------------------------------------------------------------------- /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_04_15_191331679173_create_1555355612601_permissions_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('title')->nullable(); 14 | $table->timestamps(); 15 | $table->softDeletes(); 16 | }); 17 | } 18 | 19 | public function down() 20 | { 21 | Schema::dropIfExists('permissions'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/migrations/2019_04_15_191331731390_create_1555355612581_roles_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('title')->nullable(); 14 | $table->timestamps(); 15 | $table->softDeletes(); 16 | }); 17 | } 18 | 19 | public function down() 20 | { 21 | Schema::dropIfExists('roles'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/migrations/2019_04_15_191331779537_create_1555355612782_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('name'); 14 | $table->string('email'); 15 | $table->datetime('email_verified_at')->nullable(); 16 | $table->string('password'); 17 | $table->string('remember_token')->nullable(); 18 | $table->timestamps(); 19 | $table->softDeletes(); 20 | }); 21 | } 22 | 23 | public function down() 24 | { 25 | Schema::dropIfExists('users'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/migrations/2019_04_15_191332603432_create_1555355612603_permission_role_pivot_table.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('role_id'); 13 | $table->foreign('role_id')->references('id')->on('roles'); 14 | $table->unsignedInteger('permission_id'); 15 | $table->foreign('permission_id')->references('id')->on('permissions'); 16 | }); 17 | } 18 | 19 | public function down() 20 | { 21 | Schema::dropIfExists('permission_role'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/migrations/2019_04_15_191332791021_create_1555355612790_role_user_pivot_table.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('user_id'); 13 | $table->foreign('user_id')->references('id')->on('users'); 14 | $table->unsignedInteger('role_id'); 15 | $table->foreign('role_id')->references('id')->on('roles'); 16 | }); 17 | } 18 | 19 | public function down() 20 | { 21 | Schema::dropIfExists('role_user'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/migrations/2019_04_15_191441675085_create_1555355681975_products_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('name'); 14 | $table->longText('description')->nullable(); 15 | $table->decimal('price', 15, 2)->nullable(); 16 | $table->timestamps(); 17 | $table->softDeletes(); 18 | }); 19 | } 20 | 21 | public function down() 22 | { 23 | Schema::dropIfExists('products'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->text('connection'); 19 | $table->text('queue'); 20 | $table->longText('payload'); 21 | $table->longText('exception'); 22 | $table->timestamp('failed_at')->useCurrent(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('failed_jobs'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /database/seeds/RoleUserTableSeeder.php: -------------------------------------------------------------------------------- 1 | roles()->sync(1); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /database/seeds/RolesTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 12 | 'title' => 'Admin', 13 | 'created_at' => '2019-04-15 19:13:32', 14 | 'updated_at' => '2019-04-15 19:13:32', 15 | 'deleted_at' => null, 16 | ], 17 | [ 18 | 'id' => 2, 19 | 'title' => 'User', 20 | 'created_at' => '2019-04-15 19:13:32', 21 | 'updated_at' => '2019-04-15 19:13:32', 22 | 'deleted_at' => null, 23 | ]]; 24 | 25 | Role::insert($roles); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 12 | 'name' => 'Admin', 13 | 'email' => 'admin@admin.com', 14 | 'password' => '$2y$10$imU.Hdz7VauIT3LIMCMbsOXvaaTQg6luVqkhfkBcsUd.SJW2XSRKO', 15 | 'remember_token' => null, 16 | 'created_at' => '2019-04-15 19:13:32', 17 | 'updated_at' => '2019-04-15 19:13:32', 18 | 'deleted_at' => null, 19 | ]]; 20 | 21 | User::insert($users); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /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.18", 14 | "bootstrap": "^4.0.0", 15 | "cross-env": "^5.1", 16 | "jquery": "^3.2", 17 | "laravel-mix": "^4.0.7", 18 | "lodash": "^4.17.5", 19 | "popper.js": "^1.12", 20 | "resolve-url-loader": "^2.3.1", 21 | "sass": "^1.15.2", 22 | "sass-loader": "^7.1.0", 23 | "vue": "^2.5.17" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srsedev/Laravel-Document-Founder/d4c8653ec58d9914ab41f8b903c623314461772d/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 | ClassicEditor.create(document.querySelector('.ckeditor')) 5 | 6 | moment.updateLocale('en', { 7 | week: {dow: 1} // Monday is the first day of the week 8 | }) 9 | 10 | $('.date').datetimepicker({ 11 | format: 'YYYY-MM-DD', 12 | locale: 'en' 13 | }) 14 | 15 | $('.datetime').datetimepicker({ 16 | format: 'YYYY-MM-DD HH:mm:ss', 17 | locale: 'en', 18 | sideBySide: true 19 | }) 20 | 21 | $('.timepicker').datetimepicker({ 22 | format: 'HH:mm:ss' 23 | }) 24 | 25 | $('.select-all').click(function () { 26 | let $select2 = $(this).parent().siblings('.select2') 27 | $select2.find('option').prop('selected', 'selected') 28 | $select2.trigger('change') 29 | }) 30 | $('.deselect-all').click(function () { 31 | let $select2 = $(this).parent().siblings('.select2') 32 | $select2.find('option').prop('selected', '') 33 | $select2.trigger('change') 34 | }) 35 | 36 | $('.select2').select2() 37 | 38 | $('.treeview').each(function () { 39 | var shouldExpand = false 40 | $(this).find('li').each(function () { 41 | if ($(this).hasClass('active')) { 42 | shouldExpand = true 43 | } 44 | }) 45 | if (shouldExpand) { 46 | $(this).addClass('active') 47 | } 48 | }) 49 | }) 50 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Laravel - Document - Founder -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | window.Vue = require('vue'); 11 | 12 | /** 13 | * The following block of code may be used to automatically register your 14 | * Vue components. It will recursively scan this directory for the Vue 15 | * components and automatically register them with their "basename". 16 | * 17 | * Eg. ./components/ExampleComponent.vue -> 18 | */ 19 | 20 | // const files = require.context('./', true, /\.vue$/i); 21 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)); 22 | 23 | Vue.component('example-component', require('./components/ExampleComponent.vue').default); 24 | 25 | /** 26 | * Next, we will create a fresh Vue application instance and attach it to 27 | * the page. Then, you may begin adding components to this application 28 | * or customize the JavaScript scaffolding to fit your unique needs. 29 | */ 30 | 31 | const app = new Vue({ 32 | el: '#app' 33 | }); 34 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.Popper = require('popper.js').default; 12 | window.$ = window.jQuery = require('jquery'); 13 | 14 | require('bootstrap'); 15 | } catch (e) {} 16 | 17 | /** 18 | * We'll load the axios HTTP library which allows us to easily issue requests 19 | * to our Laravel back-end. This library automatically handles sending the 20 | * CSRF token as a header based on the value of the "XSRF" token cookie. 21 | */ 22 | 23 | window.axios = require('axios'); 24 | 25 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 26 | 27 | /** 28 | * Next we will register the CSRF Token as a common header with Axios so that 29 | * all outgoing HTTP requests automatically have it attached. This is just 30 | * a simple convenience so we don't have to attach every token manually. 31 | */ 32 | 33 | let token = document.head.querySelector('meta[name="csrf-token"]'); 34 | 35 | if (token) { 36 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 37 | } else { 38 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 39 | } 40 | 41 | /** 42 | * Echo exposes an expressive API for subscribing to channels and listening 43 | * for events that are broadcast by Laravel. Echo and event broadcasting 44 | * allows your team to easily build robust real-time web applications. 45 | */ 46 | 47 | // import Echo from 'laravel-echo' 48 | 49 | // window.Pusher = require('pusher-js'); 50 | 51 | // window.Echo = new Echo({ 52 | // broadcaster: 'pusher', 53 | // key: process.env.MIX_PUSHER_APP_KEY, 54 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 55 | // encrypted: true 56 | // }); 57 | -------------------------------------------------------------------------------- /resources/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /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 | 'site_title' => 'Laravel + CoreUI', 7 | 'userManagement' => [ 8 | 'title' => 'User Management', 9 | 'title_singular' => 'User Management', 10 | 'fields' => [], 11 | ], 12 | 'permission' => [ 13 | 'title' => 'Permissions', 14 | 'title_singular' => 'Permission', 15 | 'fields' => [ 16 | 'id' => 'ID', 17 | 'id_helper' => '', 18 | 'title' => 'Title', 19 | 'title_helper' => '', 20 | 'created_at' => 'Created at', 21 | 'created_at_helper' => '', 22 | 'updated_at' => 'Updated at', 23 | 'updated_at_helper' => '', 24 | 'deleted_at' => 'Deleted at', 25 | 'deleted_at_helper' => '', 26 | ], 27 | ], 28 | 'role' => [ 29 | 'title' => 'Roles', 30 | 'title_singular' => 'Role', 31 | 'fields' => [ 32 | 'id' => 'ID', 33 | 'id_helper' => '', 34 | 'title' => 'Title', 35 | 'title_helper' => '', 36 | 'permissions' => 'Permissions', 37 | 'permissions_helper' => '', 38 | 'created_at' => 'Created at', 39 | 'created_at_helper' => '', 40 | 'updated_at' => 'Updated at', 41 | 'updated_at_helper' => '', 42 | 'deleted_at' => 'Deleted at', 43 | 'deleted_at_helper' => '', 44 | ], 45 | ], 46 | 'user' => [ 47 | 'title' => 'Users', 48 | 'title_singular' => 'User', 49 | 'fields' => [ 50 | 'id' => 'ID', 51 | 'id_helper' => '', 52 | 'name' => 'Name', 53 | 'name_helper' => '', 54 | 'email' => 'Email', 55 | 'email_helper' => '', 56 | 'email_verified_at' => 'Email verified at', 57 | 'email_verified_at_helper' => '', 58 | 'password' => 'Password', 59 | 'password_helper' => '', 60 | 'roles' => 'Roles', 61 | 'roles_helper' => '', 62 | 'remember_token' => 'Remember Token', 63 | 'remember_token_helper' => '', 64 | 'created_at' => 'Created at', 65 | 'created_at_helper' => '', 66 | 'updated_at' => 'Updated at', 67 | 'updated_at_helper' => '', 68 | 'deleted_at' => 'Deleted at', 69 | 'deleted_at_helper' => '', 70 | ], 71 | ], 72 | 'product' => [ 73 | 'title' => 'Products', 74 | 'title_singular' => 'Product', 75 | 'fields' => [ 76 | 'id' => 'ID', 77 | 'id_helper' => '', 78 | 'name' => 'Name', 79 | 'name_helper' => '', 80 | 'description' => 'Description', 81 | 'description_helper' => '', 82 | 'price' => 'Price', 83 | 'price_helper' => '', 84 | 'created_at' => 'Created At', 85 | 'created_at_helper' => '', 86 | 'updated_at' => 'Updated At', 87 | 'updated_at_helper' => '', 88 | 'deleted_at' => 'Deleted at', 89 | 'deleted_at_helper' => '', 90 | ], 91 | ], 92 | ]; 93 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 5 | 'next' => 'Next »', 6 | 'site_title' => 'Laravel + CoreUI', 7 | 'userManagement' => [ 8 | 'title' => 'User Management', 9 | 'title_singular' => 'User Management', 10 | 'fields' => [], 11 | ], 12 | 'permission' => [ 13 | 'title' => 'Permissions', 14 | 'title_singular' => 'Permission', 15 | 'fields' => [ 16 | 'id' => 'ID', 17 | 'id_helper' => '', 18 | 'title' => 'Title', 19 | 'title_helper' => '', 20 | 'created_at' => 'Created at', 21 | 'created_at_helper' => '', 22 | 'updated_at' => 'Updated at', 23 | 'updated_at_helper' => '', 24 | 'deleted_at' => 'Deleted at', 25 | 'deleted_at_helper' => '', 26 | ], 27 | ], 28 | 'role' => [ 29 | 'title' => 'Roles', 30 | 'title_singular' => 'Role', 31 | 'fields' => [ 32 | 'id' => 'ID', 33 | 'id_helper' => '', 34 | 'title' => 'Title', 35 | 'title_helper' => '', 36 | 'permissions' => 'Permissions', 37 | 'permissions_helper' => '', 38 | 'created_at' => 'Created at', 39 | 'created_at_helper' => '', 40 | 'updated_at' => 'Updated at', 41 | 'updated_at_helper' => '', 42 | 'deleted_at' => 'Deleted at', 43 | 'deleted_at_helper' => '', 44 | ], 45 | ], 46 | 'user' => [ 47 | 'title' => 'Users', 48 | 'title_singular' => 'User', 49 | 'fields' => [ 50 | 'id' => 'ID', 51 | 'id_helper' => '', 52 | 'name' => 'Name', 53 | 'name_helper' => '', 54 | 'email' => 'Email', 55 | 'email_helper' => '', 56 | 'email_verified_at' => 'Email verified at', 57 | 'email_verified_at_helper' => '', 58 | 'password' => 'Password', 59 | 'password_helper' => '', 60 | 'roles' => 'Roles', 61 | 'roles_helper' => '', 62 | 'remember_token' => 'Remember Token', 63 | 'remember_token_helper' => '', 64 | 'created_at' => 'Created at', 65 | 'created_at_helper' => '', 66 | 'updated_at' => 'Updated at', 67 | 'updated_at_helper' => '', 68 | 'deleted_at' => 'Deleted at', 69 | 'deleted_at_helper' => '', 70 | ], 71 | ], 72 | 'product' => [ 73 | 'title' => 'Products', 74 | 'title_singular' => 'Product', 75 | 'fields' => [ 76 | 'id' => 'ID', 77 | 'id_helper' => '', 78 | 'name' => 'Name', 79 | 'name_helper' => '', 80 | 'description' => 'Description', 81 | 'description_helper' => '', 82 | 'price' => 'Price', 83 | 'price_helper' => '', 84 | 'created_at' => 'Created At', 85 | 'created_at_helper' => '', 86 | 'updated_at' => 'Updated At', 87 | 'updated_at_helper' => '', 88 | 'deleted_at' => 'Deleted at', 89 | 'deleted_at_helper' => '', 90 | ], 91 | ], 92 | ]; 93 | -------------------------------------------------------------------------------- /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' => [ 9 | 'title' => 'Users', 10 | 'title_singular' => 'User', 11 | 'fields' => [ 12 | 'id' => 'ID', 13 | 'id_helper' => '', 14 | 'name' => 'Name', 15 | 'name_helper' => '', 16 | 'email' => 'Email', 17 | 'email_helper' => '', 18 | 'email_verified_at' => 'Email verified at', 19 | 'email_verified_at_helper' => '', 20 | 'password' => 'Password', 21 | 'password_helper' => '', 22 | 'roles' => 'Roles', 23 | 'roles_helper' => '', 24 | 'remember_token' => 'Remember Token', 25 | 'remember_token_helper' => '', 26 | 'created_at' => 'Created at', 27 | 'created_at_helper' => '', 28 | 'updated_at' => 'Updated at', 29 | 'updated_at_helper' => '', 30 | 'deleted_at' => 'Deleted at', 31 | 'deleted_at_helper' => '', 32 | ], 33 | ], 34 | 'updated' => 'Your password has been changed!', 35 | 'site_title' => 'Laravel + CoreUI', 36 | 'userManagement' => [ 37 | 'title' => 'User Management', 38 | 'title_singular' => 'User Management', 39 | 'fields' => [], 40 | ], 41 | 'permission' => [ 42 | 'title' => 'Permissions', 43 | 'title_singular' => 'Permission', 44 | 'fields' => [ 45 | 'id' => 'ID', 46 | 'id_helper' => '', 47 | 'title' => 'Title', 48 | 'title_helper' => '', 49 | 'created_at' => 'Created at', 50 | 'created_at_helper' => '', 51 | 'updated_at' => 'Updated at', 52 | 'updated_at_helper' => '', 53 | 'deleted_at' => 'Deleted at', 54 | 'deleted_at_helper' => '', 55 | ], 56 | ], 57 | 'role' => [ 58 | 'title' => 'Roles', 59 | 'title_singular' => 'Role', 60 | 'fields' => [ 61 | 'id' => 'ID', 62 | 'id_helper' => '', 63 | 'title' => 'Title', 64 | 'title_helper' => '', 65 | 'permissions' => 'Permissions', 66 | 'permissions_helper' => '', 67 | 'created_at' => 'Created at', 68 | 'created_at_helper' => '', 69 | 'updated_at' => 'Updated at', 70 | 'updated_at_helper' => '', 71 | 'deleted_at' => 'Deleted at', 72 | 'deleted_at_helper' => '', 73 | ], 74 | ], 75 | 'product' => [ 76 | 'title' => 'Products', 77 | 'title_singular' => 'Product', 78 | 'fields' => [ 79 | 'id' => 'ID', 80 | 'id_helper' => '', 81 | 'name' => 'Name', 82 | 'name_helper' => '', 83 | 'description' => 'Description', 84 | 'description_helper' => '', 85 | 'price' => 'Price', 86 | 'price_helper' => '', 87 | 'created_at' => 'Created At', 88 | 'created_at_helper' => '', 89 | 'updated_at' => 'Updated At', 90 | 'updated_at_helper' => '', 91 | 'deleted_at' => 'Deleted at', 92 | 'deleted_at_helper' => '', 93 | ], 94 | ], 95 | ]; 96 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f8fafc; 4 | 5 | // Typography 6 | $font-family-sans-serif: "Nunito", sans-serif; 7 | $font-size-base: 0.9rem; 8 | $line-height-base: 1.6; 9 | 10 | // Colors 11 | $blue: #3490dc; 12 | $indigo: #6574cd; 13 | $purple: #9561e2; 14 | $pink: #f66D9b; 15 | $red: #e3342f; 16 | $orange: #f6993f; 17 | $yellow: #ffed4a; 18 | $green: #38c172; 19 | $teal: #4dc0b5; 20 | $cyan: #6cb2eb; 21 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 4 | 5 | // Variables 6 | @import 'variables'; 7 | 8 | // Bootstrap 9 | @import '~bootstrap/scss/bootstrap'; 10 | 11 | .navbar-laravel { 12 | background-color: #fff; 13 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); 14 | } 15 | -------------------------------------------------------------------------------- /resources/views/admin/permissions/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.create') }} {{ trans('global.permission.title_singular') }} 7 |
8 | 9 |
10 |
11 | @csrf 12 |
13 | 14 | 15 | @if($errors->has('title')) 16 | 17 | {{ $errors->first('title') }} 18 | 19 | @endif 20 |

21 | {{ trans('global.permission.fields.title_helper') }} 22 |

23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 | 31 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permissions/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.edit') }} {{ trans('global.permission.title_singular') }} 7 |
8 | 9 |
10 |
id]) }}" method="POST" enctype="multipart/form-data"> 11 | @csrf 12 | @method('PUT') 13 |
14 | 15 | 16 | @if($errors->has('title')) 17 | 18 | {{ $errors->first('title') }} 19 | 20 | @endif 21 |

22 | {{ trans('global.permission.fields.title_helper') }} 23 |

24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 | 32 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permissions/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | @can('permission_create') 4 | 11 | @endcan 12 |
13 |
14 | {{ trans('global.permission.title_singular') }} {{ trans('global.list') }} 15 |
16 | 17 |
18 |
19 | 20 | 21 | 22 | 25 | 28 | 31 | 32 | 33 | 34 | @foreach($permissions as $key => $permission) 35 | 36 | 39 | 42 | 61 | 62 | 63 | @endforeach 64 | 65 |
23 | 24 | 26 | {{ trans('global.permission.fields.title') }} 27 | 29 |   30 |
37 | 38 | 40 | {{ $permission->title ?? '' }} 41 | 43 | @can('permission_show') 44 | 45 | {{ trans('global.view') }} 46 | 47 | @endcan 48 | @can('permission_edit') 49 | 50 | {{ trans('global.edit') }} 51 | 52 | @endcan 53 | @can('permission_delete') 54 |
55 | 56 | 57 | 58 |
59 | @endcan 60 |
66 |
67 |
68 |
69 | @section('scripts') 70 | @parent 71 | 108 | @endsection 109 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permissions/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.show') }} {{ trans('global.permission.title') }} 7 |
8 | 9 |
10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 |
14 | {{ trans('global.permission.fields.title') }} 15 | 17 | {{ $permission->title }} 18 |
22 |
23 |
24 | 25 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/products/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.create') }} {{ trans('global.product.title_singular') }} 7 |
8 | 9 |
10 |
11 | @csrf 12 |
13 | 14 | 15 | @if($errors->has('name')) 16 | 17 | {{ $errors->first('name') }} 18 | 19 | @endif 20 |

21 | {{ trans('global.product.fields.name_helper') }} 22 |

23 |
24 |
25 | 26 | 27 | @if($errors->has('description')) 28 | 29 | {{ $errors->first('description') }} 30 | 31 | @endif 32 |

33 | {{ trans('global.product.fields.description_helper') }} 34 |

35 |
36 |
37 | 38 | 39 | @if($errors->has('price')) 40 | 41 | {{ $errors->first('price') }} 42 | 43 | @endif 44 |

45 | {{ trans('global.product.fields.price_helper') }} 46 |

47 |
48 |
49 | 50 |
51 |
52 |
53 |
54 | 55 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/products/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.edit') }} {{ trans('global.product.title_singular') }} 7 |
8 | 9 |
10 |
id]) }}" method="POST" enctype="multipart/form-data"> 11 | @csrf 12 | @method('PUT') 13 |
14 | 15 | 16 | @if($errors->has('name')) 17 | 18 | {{ $errors->first('name') }} 19 | 20 | @endif 21 |

22 | {{ trans('global.product.fields.name_helper') }} 23 |

24 |
25 |
26 | 27 | 28 | @if($errors->has('description')) 29 | 30 | {{ $errors->first('description') }} 31 | 32 | @endif 33 |

34 | {{ trans('global.product.fields.description_helper') }} 35 |

36 |
37 |
38 | 39 | 40 | @if($errors->has('price')) 41 | 42 | {{ $errors->first('price') }} 43 | 44 | @endif 45 |

46 | {{ trans('global.product.fields.price_helper') }} 47 |

48 |
49 |
50 | 51 |
52 |
53 |
54 |
55 | 56 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/products/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.show') }} {{ trans('global.product.title') }} 7 |
8 | 9 |
10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 |
14 | {{ trans('global.product.fields.name') }} 15 | 17 | {{ $product->name }} 18 |
22 | {{ trans('global.product.fields.description') }} 23 | 25 | {!! $product->description !!} 26 |
30 | {{ trans('global.product.fields.price') }} 31 | 33 | ${{ $product->price }} 34 |
38 |
39 |
40 | 41 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/roles/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.create') }} {{ trans('global.role.title_singular') }} 7 |
8 | 9 |
10 |
11 | @csrf 12 |
13 | 14 | 15 | @if($errors->has('title')) 16 | 17 | {{ $errors->first('title') }} 18 | 19 | @endif 20 |

21 | {{ trans('global.role.fields.title_helper') }} 22 |

23 |
24 |
25 | 28 | 35 | @if($errors->has('permissions')) 36 | 37 | {{ $errors->first('permissions') }} 38 | 39 | @endif 40 |

41 | {{ trans('global.role.fields.permissions_helper') }} 42 |

43 |
44 |
45 | 46 |
47 |
48 |
49 |
50 | 51 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/roles/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.edit') }} {{ trans('global.role.title_singular') }} 7 |
8 | 9 |
10 |
id]) }}" method="POST" enctype="multipart/form-data"> 11 | @csrf 12 | @method('PUT') 13 |
14 | 15 | 16 | @if($errors->has('title')) 17 | 18 | {{ $errors->first('title') }} 19 | 20 | @endif 21 |

22 | {{ trans('global.role.fields.title_helper') }} 23 |

24 |
25 |
26 | 29 | 36 | @if($errors->has('permissions')) 37 | 38 | {{ $errors->first('permissions') }} 39 | 40 | @endif 41 |

42 | {{ trans('global.role.fields.permissions_helper') }} 43 |

44 |
45 |
46 | 47 |
48 |
49 |
50 |
51 | 52 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/roles/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.show') }} {{ trans('global.role.title') }} 7 |
8 | 9 |
10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 | 24 | 29 | 30 | 31 |
14 | {{ trans('global.role.fields.title') }} 15 | 17 | {{ $role->title }} 18 |
22 | Permissions 23 | 25 | @foreach($role->permissions as $id => $permissions) 26 | {{ $permissions->title }} 27 | @endforeach 28 |
32 |
33 |
34 | 35 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/userManagements/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.create') }} {{ trans('global.userManagement.title_singular') }} 7 |
8 | 9 |
10 |
11 | @csrf 12 |
13 | 14 |
15 |
16 |
17 |
18 | 19 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/userManagements/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.edit') }} {{ trans('global.userManagement.title_singular') }} 7 |
8 | 9 |
10 |
id]) }}" method="POST" enctype="multipart/form-data"> 11 | @csrf 12 | @method('PUT') 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/userManagements/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | @can('user_management_create') 4 | 11 | @endcan 12 |
13 |
14 | {{ trans('global.userManagement.title_singular') }} {{ trans('global.list') }} 15 |
16 | 17 |
18 |
19 | 20 | 21 | 22 | 25 | 28 | 29 | 30 | 31 | @foreach($userManagements as $key => $userManagement) 32 | 33 | 36 | 55 | 56 | 57 | @endforeach 58 | 59 |
23 | 24 | 26 |   27 |
34 | 35 | 37 | @can('user_management_show') 38 | 39 | {{ trans('global.view') }} 40 | 41 | @endcan 42 | @can('user_management_edit') 43 | 44 | {{ trans('global.edit') }} 45 | 46 | @endcan 47 | @can('user_management_delete') 48 |
49 | 50 | 51 | 52 |
53 | @endcan 54 |
60 |
61 |
62 |
63 | @section('scripts') 64 | @parent 65 | 102 | @endsection 103 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/userManagements/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.show') }} {{ trans('global.userManagement.title') }} 7 |
8 | 9 |
10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 | 18 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/users/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.create') }} {{ trans('global.user.title_singular') }} 7 |
8 | 9 |
10 |
11 | @csrf 12 |
13 | 14 | 15 | @if($errors->has('name')) 16 | 17 | {{ $errors->first('name') }} 18 | 19 | @endif 20 |

21 | {{ trans('global.user.fields.name_helper') }} 22 |

23 |
24 |
25 | 26 | 27 | @if($errors->has('email')) 28 | 29 | {{ $errors->first('email') }} 30 | 31 | @endif 32 |

33 | {{ trans('global.user.fields.email_helper') }} 34 |

35 |
36 |
37 | 38 | 39 | @if($errors->has('password')) 40 | 41 | {{ $errors->first('password') }} 42 | 43 | @endif 44 |

45 | {{ trans('global.user.fields.password_helper') }} 46 |

47 |
48 |
49 | 52 | 59 | @if($errors->has('roles')) 60 | 61 | {{ $errors->first('roles') }} 62 | 63 | @endif 64 |

65 | {{ trans('global.user.fields.roles_helper') }} 66 |

67 |
68 |
69 | 70 |
71 |
72 |
73 |
74 | 75 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/users/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.edit') }} {{ trans('global.user.title_singular') }} 7 |
8 | 9 |
10 |
id]) }}" method="POST" enctype="multipart/form-data"> 11 | @csrf 12 | @method('PUT') 13 |
14 | 15 | 16 | @if($errors->has('name')) 17 | 18 | {{ $errors->first('name') }} 19 | 20 | @endif 21 |

22 | {{ trans('global.user.fields.name_helper') }} 23 |

24 |
25 |
26 | 27 | 28 | @if($errors->has('email')) 29 | 30 | {{ $errors->first('email') }} 31 | 32 | @endif 33 |

34 | {{ trans('global.user.fields.email_helper') }} 35 |

36 |
37 |
38 | 39 | 40 | @if($errors->has('password')) 41 | 42 | {{ $errors->first('password') }} 43 | 44 | @endif 45 |

46 | {{ trans('global.user.fields.password_helper') }} 47 |

48 |
49 |
50 | 53 | 60 | @if($errors->has('roles')) 61 | 62 | {{ $errors->first('roles') }} 63 | 64 | @endif 65 |

66 | {{ trans('global.user.fields.roles_helper') }} 67 |

68 |
69 |
70 | 71 |
72 |
73 |
74 |
75 | 76 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/users/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 | {{ trans('global.show') }} {{ trans('global.user.title') }} 7 |
8 | 9 |
10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 | 40 | 45 | 46 | 47 |
14 | {{ trans('global.user.fields.name') }} 15 | 17 | {{ $user->name }} 18 |
22 | {{ trans('global.user.fields.email') }} 23 | 25 | {{ $user->email }} 26 |
30 | {{ trans('global.user.fields.email_verified_at') }} 31 | 33 | {{ $user->email_verified_at }} 34 |
38 | Roles 39 | 41 | @foreach($user->roles as $id => $roles) 42 | {{ $roles->title }} 43 | @endforeach 44 |
48 |
49 |
50 | 51 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |
7 |
8 | @if(\Session::has('message')) 9 |

10 | {{ \Session::get('message') }} 11 |

12 | @endif 13 |
14 | {{ csrf_field() }} 15 |

16 | 21 |

22 |

{{ trans('global.login') }}

23 |
24 |
25 | 26 |
27 | 28 |
29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 |
37 | 38 | 41 |
42 | 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |
7 |
8 |
9 | {{ csrf_field() }} 10 |

11 | 16 |

17 |

18 |
19 | {{ csrf_field() }} 20 |
21 | 22 | @if($errors->has('email')) 23 | 24 | {{ $errors->first('email') }} 25 | 26 | @endif 27 |
28 |
29 |
30 |
31 | 34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |
7 |
8 |
9 | {{ csrf_field() }} 10 |

11 | 16 |

17 |

18 |
19 | 20 |
21 | 22 | @if($errors->has('email')) 23 | 24 | {{ $errors->first('email') }} 25 | 26 | @endif 27 |
28 |
29 | 30 | @if($errors->has('password')) 31 | 32 | {{ $errors->first('password') }} 33 | 34 | @endif 35 |
36 |
37 | 38 | @if($errors->has('password_confirmation')) 39 | 40 | {{ $errors->first('password_confirmation') }} 41 | 42 | @endif 43 |
44 |
45 |
46 |
47 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Register') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @if ($errors->has('name')) 21 | 22 | {{ $errors->first('name') }} 23 | 24 | @endif 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @if ($errors->has('email')) 35 | 36 | {{ $errors->first('email') }} 37 | 38 | @endif 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @if ($errors->has('password')) 49 | 50 | {{ $errors->first('password') }} 51 | 52 | @endif 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, {{ __('click here to request another') }}. 19 |
20 |
21 |
22 |
23 |
24 | @endsection 25 | -------------------------------------------------------------------------------- /resources/views/errors/401.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Unauthorized')) 4 | @section('code', '401') 5 | @section('message', __('Unauthorized')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/403.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Forbidden')) 4 | @section('code', '403') 5 | @section('message', __($exception->getMessage() ?: 'Forbidden')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/404.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Not Found')) 4 | @section('code', '404') 5 | @section('message', __('Not Found')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/419.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Page Expired')) 4 | @section('code', '419') 5 | @section('message', __('Page Expired')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/429.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Too Many Requests')) 4 | @section('code', '429') 5 | @section('message', __('Too Many Requests')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/500.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Server Error')) 4 | @section('code', '500') 5 | @section('message', __('Server Error')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Service Unavailable')) 4 | @section('code', '503') 5 | @section('message', __($exception->getMessage() ?: 'Service Unavailable')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @yield('title') 8 | 9 | 10 | 11 | 12 | 13 | 14 | 47 | 48 | 49 |
50 |
51 |
52 | @yield('message') 53 |
54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /resources/views/errors/minimal.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @yield('title') 8 | 9 | 10 | 11 | 12 | 13 | 14 | 50 | 51 | 52 |
53 |
54 | @yield('code') 55 |
56 | 57 |
58 | @yield('message') 59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 |
5 |
6 | Home 7 |
8 |
9 |
10 | @endsection 11 | @section('scripts') 12 | @parent 13 | 14 | @endsection -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ trans('global.site_title') }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | @yield("content") 27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /resources/views/partials/menu.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/button.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 |
4 | 5 | 6 | 15 | 16 |
7 | 8 | 9 | 12 | 13 |
10 | {{ $slot }} 11 |
14 |
17 |
20 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/footer.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/header.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ $slot }} 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 25 | 26 | 27 | 28 | 51 | 52 |
29 | 30 | {{ $header ?? '' }} 31 | 32 | 33 | 34 | 46 | 47 | 48 | {{ $footer ?? '' }} 49 |
35 | 36 | 37 | 38 | 43 | 44 |
39 | {{ Illuminate\Mail\Markdown::parse($slot) }} 40 | 41 | {{ $subcopy ?? '' }} 42 |
45 |
50 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/message.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::layout') 2 | {{-- Header --}} 3 | @slot('header') 4 | @component('mail::header', ['url' => config('app.url')]) 5 | {{ config('app.name') }} 6 | @endcomponent 7 | @endslot 8 | 9 | {{-- Body --}} 10 | {{ $slot }} 11 | 12 | {{-- Subcopy --}} 13 | @isset($subcopy) 14 | @slot('subcopy') 15 | @component('mail::subcopy') 16 | {{ $subcopy }} 17 | @endcomponent 18 | @endslot 19 | @endisset 20 | 21 | {{-- Footer --}} 22 | @slot('footer') 23 | @component('mail::footer') 24 | © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') 25 | @endcomponent 26 | @endslot 27 | @endcomponent 28 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/panel.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 |
4 | 5 | 6 | 9 | 10 |
7 | {{ Illuminate\Mail\Markdown::parse($slot) }} 8 |
11 |
14 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/promotion.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 |
4 | {{ Illuminate\Mail\Markdown::parse($slot) }} 5 |
8 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/promotion/button.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 |
4 | 5 | 6 | 9 | 10 |
7 | {{ $slot }} 8 |
11 |
14 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/subcopy.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 |
4 | {{ Illuminate\Mail\Markdown::parse($slot) }} 5 |
8 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/table.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ Illuminate\Mail\Markdown::parse($slot) }} 3 |
4 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/button.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }}: {{ $url }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/footer.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/header.blade.php: -------------------------------------------------------------------------------- 1 | [{{ $slot }}]({{ $url }}) 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/layout.blade.php: -------------------------------------------------------------------------------- 1 | {!! strip_tags($header) !!} 2 | 3 | {!! strip_tags($slot) !!} 4 | @isset($subcopy) 5 | 6 | {!! strip_tags($subcopy) !!} 7 | @endisset 8 | 9 | {!! strip_tags($footer) !!} 10 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/message.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::layout') 2 | {{-- Header --}} 3 | @slot('header') 4 | @component('mail::header', ['url' => config('app.url')]) 5 | {{ config('app.name') }} 6 | @endcomponent 7 | @endslot 8 | 9 | {{-- Body --}} 10 | {{ $slot }} 11 | 12 | {{-- Subcopy --}} 13 | @isset($subcopy) 14 | @slot('subcopy') 15 | @component('mail::subcopy') 16 | {{ $subcopy }} 17 | @endcomponent 18 | @endslot 19 | @endisset 20 | 21 | {{-- Footer --}} 22 | @slot('footer') 23 | @component('mail::footer') 24 | © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') 25 | @endcomponent 26 | @endslot 27 | @endcomponent 28 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/panel.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/promotion.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/promotion/button.blade.php: -------------------------------------------------------------------------------- 1 | [{{ $slot }}]({{ $url }}) 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/subcopy.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/table.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/notifications/email.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | {{-- Greeting --}} 3 | @if (! empty($greeting)) 4 | # {{ $greeting }} 5 | @else 6 | @if ($level === 'error') 7 | # @lang('Whoops!') 8 | @else 9 | # @lang('Hello!') 10 | @endif 11 | @endif 12 | 13 | {{-- Intro Lines --}} 14 | @foreach ($introLines as $line) 15 | {{ $line }} 16 | 17 | @endforeach 18 | 19 | {{-- Action Button --}} 20 | @isset($actionText) 21 | 31 | @component('mail::button', ['url' => $actionUrl, 'color' => $color]) 32 | {{ $actionText }} 33 | @endcomponent 34 | @endisset 35 | 36 | {{-- Outro Lines --}} 37 | @foreach ($outroLines as $line) 38 | {{ $line }} 39 | 40 | @endforeach 41 | 42 | {{-- Salutation --}} 43 | @if (! empty($salutation)) 44 | {{ $salutation }} 45 | @else 46 | @lang('Regards'),
{{ config('app.name') }} 47 | @endif 48 | 49 | {{-- Subcopy --}} 50 | @isset($actionText) 51 | @slot('subcopy') 52 | @lang( 53 | "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\n". 54 | 'into your web browser: [:actionURL](:actionURL)', 55 | [ 56 | 'actionText' => $actionText, 57 | 'actionURL' => $actionUrl, 58 | ] 59 | ) 60 | @endslot 61 | @endisset 62 | @endcomponent 63 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 44 | @endif 45 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 44 | @endif 45 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/semantic-ui.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 36 | @endif 37 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 25 | @endif 26 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 17 | @endif 18 | -------------------------------------------------------------------------------- /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 | 80 | @endif 81 | 82 |
83 |
84 | Laravel 85 |
86 | 87 | 96 |
97 |
98 | 99 | 100 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | 'v1', 'as' => 'admin.', 'namespace' => 'Api\V1\Admin'], function () { 4 | Route::apiResource('permissions', 'PermissionsApiController'); 5 | 6 | Route::apiResource('roles', 'RolesApiController'); 7 | 8 | Route::apiResource('users', 'UsersApiController'); 9 | 10 | Route::apiResource('products', 'ProductsApiController'); 11 | }); 12 | -------------------------------------------------------------------------------- /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]); 8 | 9 | Route::group(['prefix' => 'admin', 'as' => 'admin.', 'namespace' => 'Admin', 'middleware' => ['auth']], function () { 10 | Route::get('/', 'HomeController@index')->name('home'); 11 | 12 | Route::delete('permissions/destroy', 'PermissionsController@massDestroy')->name('permissions.massDestroy'); 13 | 14 | Route::resource('permissions', 'PermissionsController'); 15 | 16 | Route::delete('roles/destroy', 'RolesController@massDestroy')->name('roles.massDestroy'); 17 | 18 | Route::resource('roles', 'RolesController'); 19 | 20 | Route::delete('users/destroy', 'UsersController@massDestroy')->name('users.massDestroy'); 21 | 22 | Route::resource('users', 'UsersController'); 23 | 24 | Route::delete('products/destroy', 'ProductsController@massDestroy')->name('products.massDestroy'); 25 | 26 | Route::resource('products', 'ProductsController'); 27 | }); 28 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /tests/Browser/ProductsTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) use ($admin) { 15 | $browser->loginAs($admin); 16 | $browser->visit(route('admin.products.index')); 17 | $browser->assertRouteIs('admin.products.index'); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------