├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .idea ├── encodings.xml ├── misc.xml ├── modules.xml ├── php.xml ├── q2.iml ├── vcs.xml └── workspace.xml ├── .styleci.yml ├── app ├── Console │ └── Kernel.php ├── Country.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── CountriesController.php │ │ │ ├── HomeController.php │ │ │ ├── JobsController.php │ │ │ ├── PermissionsController.php │ │ │ ├── ProposalsController.php │ │ │ ├── RolesController.php │ │ │ └── UsersController.php │ │ ├── Api │ │ │ └── V1 │ │ │ │ └── Admin │ │ │ │ ├── CountriesApiController.php │ │ │ │ ├── JobsApiController.php │ │ │ │ ├── PermissionsApiController.php │ │ │ │ ├── ProposalsApiController.php │ │ │ │ ├── RolesApiController.php │ │ │ │ └── UsersApiController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ └── Traits │ │ │ └── MediaUploadingTrait.php │ ├── Kernel.php │ ├── Middleware │ │ ├── AuthGates.php │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── SetLocale.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── MassDestroyCountryRequest.php │ │ ├── MassDestroyJobRequest.php │ │ ├── MassDestroyPermissionRequest.php │ │ ├── MassDestroyProposalRequest.php │ │ ├── MassDestroyRoleRequest.php │ │ ├── MassDestroyUserRequest.php │ │ ├── StoreCountryRequest.php │ │ ├── StoreJobRequest.php │ │ ├── StorePermissionRequest.php │ │ ├── StoreProposalRequest.php │ │ ├── StoreRoleRequest.php │ │ ├── StoreUserRequest.php │ │ ├── UpdateCountryRequest.php │ │ ├── UpdateJobRequest.php │ │ ├── UpdatePermissionRequest.php │ │ ├── UpdateProposalRequest.php │ │ ├── UpdateRoleRequest.php │ │ └── UpdateUserRequest.php ├── Job.php ├── Permission.php ├── Proposal.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_29_051210370053_create_1556514730659_permissions_table.php │ ├── 2019_04_29_051210408714_create_1556514731009_roles_table.php │ ├── 2019_04_29_051210460123_create_1556514731122_users_table.php │ ├── 2019_04_29_051211029572_create_1556514731027_permission_role_pivot_table.php │ ├── 2019_04_29_051211140552_create_1556514731140_role_user_pivot_table.php │ ├── 2019_04_29_051243316170_update_1556514763608_users_table.php │ ├── 2019_04_29_051258210314_create_1556514778726_countries_table.php │ ├── 2019_04_29_051327505359_update_1556514808851_users_table.php │ ├── 2019_04_29_051550536430_create_1556514953174_jobs_table.php │ ├── 2019_04_29_051553003923_custom_1556514953003_create_media_table.php │ └── 2019_04_29_051823433434_create_1556515103983_proposals_table.php └── seeds │ ├── CountriesTableSeeder.php │ ├── DatabaseSeeder.php │ ├── PermissionRoleTableSeeder.php │ ├── PermissionsTableSeeder.php │ ├── RoleUserTableSeeder.php │ ├── RolesTableSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── 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 │ ├── countries │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── jobs │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── permissions │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── proposals │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── roles │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ └── users │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── 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 │ ├── CountriesTest.php │ ├── JobsTest.php │ ├── PermissionsTest.php │ ├── ProposalsTest.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 | .env 7 | .phpunit.result.cache 8 | Homestead.json 9 | Homestead.yaml 10 | npm-debug.log 11 | yarn-error.log 12 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | css: true 10 | -------------------------------------------------------------------------------- /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/Country.php: -------------------------------------------------------------------------------- 1 | all()); 34 | 35 | return redirect()->route('admin.countries.index'); 36 | } 37 | 38 | public function edit(Country $country) 39 | { 40 | abort_unless(\Gate::allows('country_edit'), 403); 41 | 42 | return view('admin.countries.edit', compact('country')); 43 | } 44 | 45 | public function update(UpdateCountryRequest $request, Country $country) 46 | { 47 | abort_unless(\Gate::allows('country_edit'), 403); 48 | 49 | $country->update($request->all()); 50 | 51 | return redirect()->route('admin.countries.index'); 52 | } 53 | 54 | public function show(Country $country) 55 | { 56 | abort_unless(\Gate::allows('country_show'), 403); 57 | 58 | return view('admin.countries.show', compact('country')); 59 | } 60 | 61 | public function destroy(Country $country) 62 | { 63 | abort_unless(\Gate::allows('country_delete'), 403); 64 | 65 | $country->delete(); 66 | 67 | return back(); 68 | } 69 | 70 | public function massDestroy(MassDestroyCountryRequest $request) 71 | { 72 | Country::whereIn('id', request('ids'))->delete(); 73 | 74 | return response(null, 204); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/HomeController.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/ProposalsController.php: -------------------------------------------------------------------------------- 1 | id())->get(); 23 | 24 | return view('admin.proposals.index', compact('proposals')); 25 | } 26 | 27 | public function create() 28 | { 29 | abort_unless(\Gate::allows('proposal_create'), 403); 30 | 31 | return view('admin.proposals.create', compact('jobs', 'candidates')); 32 | } 33 | 34 | public function store(StoreProposalRequest $request) 35 | { 36 | abort_unless(\Gate::allows('proposal_create'), 403); 37 | 38 | $proposal = Proposal::create($request->all() + ['candidate_id' => auth()->id()]); 39 | 40 | foreach ($request->input('attachments', []) as $file) { 41 | $proposal->addMedia(storage_path('tmp/uploads/' . $file))->toMediaCollection('attachments'); 42 | } 43 | 44 | return redirect()->route('admin.proposals.index'); 45 | } 46 | 47 | public function edit(Proposal $proposal) 48 | { 49 | abort_unless(\Gate::allows('proposal_edit'), 403); 50 | 51 | return view('admin.proposals.edit', compact('proposal')); 52 | } 53 | 54 | public function update(UpdateProposalRequest $request, Proposal $proposal) 55 | { 56 | abort_unless(\Gate::allows('proposal_edit'), 403); 57 | 58 | $proposal->update($request->all()); 59 | 60 | if (count($proposal->attachments) > 0) { 61 | foreach ($proposal->attachments as $media) { 62 | if (!in_array($media->file_name, $request->input('attachments', []))) { 63 | $media->delete(); 64 | } 65 | } 66 | } 67 | 68 | $media = $proposal->attachments->pluck('file_name')->toArray(); 69 | 70 | foreach ($request->input('attachments', []) as $file) { 71 | if (count($media) === 0 || !in_array($file, $media)) { 72 | $proposal->addMedia(storage_path('tmp/uploads/' . $file))->toMediaCollection('attachments'); 73 | } 74 | } 75 | 76 | return redirect()->route('admin.proposals.index'); 77 | } 78 | 79 | public function show(Proposal $proposal) 80 | { 81 | abort_unless(\Gate::allows('proposal_show'), 403); 82 | 83 | $proposal->load('job', 'candidate'); 84 | 85 | return view('admin.proposals.show', compact('proposal')); 86 | } 87 | 88 | public function destroy(Proposal $proposal) 89 | { 90 | abort_unless(\Gate::allows('proposal_delete'), 403); 91 | 92 | $proposal->delete(); 93 | 94 | return back(); 95 | } 96 | 97 | public function massDestroy(MassDestroyProposalRequest $request) 98 | { 99 | Proposal::whereIn('id', request('ids'))->delete(); 100 | 101 | return response(null, 204); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /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'); 29 | 30 | $countries = Country::all()->pluck('name', 'id')->prepend(trans('global.pleaseSelect'), ''); 31 | 32 | return view('admin.users.create', compact('roles', 'countries')); 33 | } 34 | 35 | public function store(StoreUserRequest $request) 36 | { 37 | abort_unless(\Gate::allows('user_create'), 403); 38 | 39 | $user = User::create($request->all()); 40 | $user->roles()->sync($request->input('roles', [])); 41 | 42 | return redirect()->route('admin.users.index'); 43 | } 44 | 45 | public function edit(User $user) 46 | { 47 | abort_unless(\Gate::allows('user_edit'), 403); 48 | 49 | $roles = Role::all()->pluck('title', 'id'); 50 | 51 | $countries = Country::all()->pluck('name', 'id')->prepend(trans('global.pleaseSelect'), ''); 52 | 53 | $user->load('roles', 'country'); 54 | 55 | return view('admin.users.edit', compact('roles', 'countries', 'user')); 56 | } 57 | 58 | public function update(UpdateUserRequest $request, User $user) 59 | { 60 | abort_unless(\Gate::allows('user_edit'), 403); 61 | 62 | $user->update($request->all()); 63 | $user->roles()->sync($request->input('roles', [])); 64 | 65 | return redirect()->route('admin.users.index'); 66 | } 67 | 68 | public function show(User $user) 69 | { 70 | abort_unless(\Gate::allows('user_show'), 403); 71 | 72 | $user->load('roles', 'country'); 73 | 74 | return view('admin.users.show', compact('user')); 75 | } 76 | 77 | public function destroy(User $user) 78 | { 79 | abort_unless(\Gate::allows('user_delete'), 403); 80 | 81 | $user->delete(); 82 | 83 | return back(); 84 | } 85 | 86 | public function massDestroy(MassDestroyUserRequest $request) 87 | { 88 | User::whereIn('id', request('ids'))->delete(); 89 | 90 | return response(null, 204); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/Admin/CountriesApiController.php: -------------------------------------------------------------------------------- 1 | all()); 22 | } 23 | 24 | public function update(UpdateCountryRequest $request, Country $country) 25 | { 26 | return $country->update($request->all()); 27 | } 28 | 29 | public function show(Country $country) 30 | { 31 | return $country; 32 | } 33 | 34 | public function destroy(Country $country) 35 | { 36 | return $country->delete(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/Admin/JobsApiController.php: -------------------------------------------------------------------------------- 1 | all()); 22 | } 23 | 24 | public function update(UpdateJobRequest $request, Job $job) 25 | { 26 | return $job->update($request->all()); 27 | } 28 | 29 | public function show(Job $job) 30 | { 31 | return $job; 32 | } 33 | 34 | public function destroy(Job $job) 35 | { 36 | return $job->delete(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /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/ProposalsApiController.php: -------------------------------------------------------------------------------- 1 | all()); 22 | } 23 | 24 | public function update(UpdateProposalRequest $request, Proposal $proposal) 25 | { 26 | return $proposal->update($request->all()); 27 | } 28 | 29 | public function show(Proposal $proposal) 30 | { 31 | return $proposal; 32 | } 33 | 34 | public function destroy(Proposal $proposal) 35 | { 36 | return $proposal->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'); 42 | } 43 | 44 | /** 45 | * Get a validator for an incoming registration request. 46 | * 47 | * @param array $data 48 | * @return \Illuminate\Contracts\Validation\Validator 49 | */ 50 | protected function validator(array $data) 51 | { 52 | return Validator::make($data, [ 53 | 'name' => ['required', 'string', 'max:255'], 54 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 55 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 56 | ]); 57 | } 58 | 59 | /** 60 | * Create a new user instance after a valid registration. 61 | * 62 | * @param array $data 63 | * @return \App\User 64 | */ 65 | protected function create(array $data) 66 | { 67 | $user = User::create([ 68 | 'name' => $data['name'], 69 | 'email' => $data['email'], 70 | 'password' => Hash::make($data['password']), 71 | 'about' => $data['about'], 72 | 'country_id' => $data['country_id'] 73 | ]); 74 | 75 | $role_id = $data['role_id']; 76 | if (!in_array($role_id, [2,3])) { 77 | $role_id = 2; 78 | } 79 | $user->roles()->attach($role_id); 80 | 81 | return $user; 82 | } 83 | 84 | /** 85 | * Show the application registration form. 86 | * 87 | * @return \Illuminate\Http\Response 88 | */ 89 | public function showRegistrationForm() 90 | { 91 | $countries = Country::all(); 92 | return view('auth.register', compact('countries')); 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /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/Controllers/Traits/MediaUploadingTrait.php: -------------------------------------------------------------------------------- 1 | file('file'); 18 | 19 | $name = uniqid() . '_' . trim($file->getClientOriginalName()); 20 | 21 | $file->move($path, $name); 22 | 23 | return response()->json([ 24 | 'name' => $name, 25 | 'original_name' => $file->getClientOriginalName(), 26 | ]); 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:countries,id', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/MassDestroyJobRequest.php: -------------------------------------------------------------------------------- 1 | 'required|array', 20 | 'ids.*' => 'exists:jobs,id', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/MassDestroyPermissionRequest.php: -------------------------------------------------------------------------------- 1 | 'required|array', 20 | 'ids.*' => 'exists:permissions,id', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/MassDestroyProposalRequest.php: -------------------------------------------------------------------------------- 1 | 'required|array', 20 | 'ids.*' => 'exists:proposals,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/StoreCountryRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | 'short_code' => [ 22 | 'required', 23 | ], 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreJobRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | 'description' => [ 22 | 'required', 23 | ], 24 | 'budget' => [ 25 | 'required', 26 | ], 27 | 'delivery_date' => [ 28 | 'date_format:' . config('panel.date_format'), 29 | 'nullable', 30 | ], 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Requests/StorePermissionRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreProposalRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | 'integer', 21 | ], 22 | 'proposal_text' => [ 23 | 'required', 24 | ], 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /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 | 'country_id' => [ 35 | 'required', 36 | 'integer', 37 | ], 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateCountryRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | 'short_code' => [ 22 | 'required', 23 | ], 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateJobRequest.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'required', 20 | ], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateProposalRequest.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 | 'country_id' => [ 32 | 'required', 33 | 'integer', 34 | ], 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Job.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class, 'employer_id'); 41 | } 42 | 43 | public function candidate() 44 | { 45 | return $this->belongsTo(User::class, 'candidate_id'); 46 | } 47 | 48 | public function proposals() 49 | { 50 | return $this->hasMany(Proposal::class, 'job_id'); 51 | } 52 | 53 | public function getattachmentsAttribute() 54 | { 55 | return $this->getMedia('attachments'); 56 | } 57 | 58 | public function getDeliveryDateAttribute($value) 59 | { 60 | return $value ? Carbon::parse($value)->format(config('panel.date_format')) : null; 61 | } 62 | 63 | public function setDeliveryDateAttribute($value) 64 | { 65 | $this->attributes['delivery_date'] = $value ? Carbon::createFromFormat(config('panel.date_format'), $value)->format('Y-m-d') : null; 66 | } 67 | 68 | public function getHiredAtAttribute($value) 69 | { 70 | return $value ? Carbon::createFromFormat('Y-m-d H:i:s', $value)->format(config('panel.date_format') . ' ' . config('panel.time_format')) : null; 71 | } 72 | 73 | public function setHiredAtAttribute($value) 74 | { 75 | $this->attributes['hired_at'] = $value ? Carbon::createFromFormat(config('panel.date_format') . ' ' . config('panel.time_format'), $value)->format('Y-m-d H:i:s') : null; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/Permission.php: -------------------------------------------------------------------------------- 1 | belongsTo(Job::class, 'job_id'); 41 | } 42 | 43 | public function candidate() 44 | { 45 | return $this->belongsTo(User::class, 'candidate_id'); 46 | } 47 | 48 | public function getattachmentsAttribute() 49 | { 50 | return $this->getMedia('attachments'); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.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); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | format(config('panel.date_format') . ' ' . config('panel.time_format')) : null; 49 | } 50 | 51 | public function setEmailVerifiedAtAttribute($value) 52 | { 53 | $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; 54 | } 55 | 56 | public function setPasswordAttribute($input) 57 | { 58 | if ($input) { 59 | $this->attributes['password'] = app('hash')->needsRehash($input) ? Hash::make($input) : $input; 60 | } 61 | } 62 | 63 | public function sendPasswordResetNotification($token) 64 | { 65 | $this->notify(new ResetPassword($token)); 66 | } 67 | 68 | public function roles() 69 | { 70 | return $this->belongsToMany(Role::class); 71 | } 72 | 73 | public function country() 74 | { 75 | return $this->belongsTo(Country::class, 'country_id'); 76 | } 77 | 78 | public function isEmployer() 79 | { 80 | return $this->roles()->where('id', 2)->count() > 0; 81 | } 82 | 83 | public function isCandidate() 84 | { 85 | return $this->roles()->where('id', 3)->count() > 0; 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /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.1.3", 12 | "bugsnag/bugsnag-laravel": "^2.15", 13 | "doctrine/dbal": "^2.9", 14 | "fideloper/proxy": "^4.0", 15 | "laravel/framework": "5.8.*", 16 | "laravel/tinker": "^1.0", 17 | "yajra/laravel-datatables-oracle": "~9.0", 18 | "spatie/laravel-medialibrary": "^7.0.0" 19 | }, 20 | "require-dev": { 21 | "beyondcode/laravel-dump-server": "^1.0", 22 | "filp/whoops": "^2.0", 23 | "fzaninotto/faker": "^1.4", 24 | "laravel/dusk": "^5.0", 25 | "mockery/mockery": "^1.0", 26 | "nunomaduro/collision": "^3.0", 27 | "phpunit/phpunit": "^7.5" 28 | }, 29 | "config": { 30 | "optimize-autoloader": true, 31 | "preferred-install": "dist", 32 | "sort-packages": true 33 | }, 34 | "extra": { 35 | "laravel": { 36 | "dont-discover": [] 37 | } 38 | }, 39 | "autoload": { 40 | "psr-4": { 41 | "App\\": "app/" 42 | }, 43 | "classmap": [ 44 | "database/seeds", 45 | "database/factories" 46 | ] 47 | }, 48 | "autoload-dev": { 49 | "psr-4": { 50 | "Tests\\": "tests/" 51 | } 52 | }, 53 | "minimum-stability": "dev", 54 | "prefer-stable": true, 55 | "scripts": { 56 | "post-autoload-dump": [ 57 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 58 | "@php artisan package:discover --ansi" 59 | ], 60 | "post-root-package-install": [ 61 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 62 | ], 63 | "post-create-project-cmd": [ 64 | "@php artisan key:generate --ansi" 65 | ] 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /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 | 'registration_default_role' => '2', 11 | ]; 12 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | 'queue' => env('REDIS_QUEUE', 'default'), 65 | 'retry_after' => 90, 66 | 'block_for' => null, 67 | ], 68 | 69 | ], 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Failed Queue Jobs 74 | |-------------------------------------------------------------------------- 75 | | 76 | | These options configure the behavior of failed queue job logging so you 77 | | can control which database and table are used to store the jobs that 78 | | have failed. You may change them to any database / table you wish. 79 | | 80 | */ 81 | 82 | 'failed' => [ 83 | '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_29_051210370053_create_1556514730659_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_29_051210408714_create_1556514731009_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_29_051210460123_create_1556514731122_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_29_051211029572_create_1556514731027_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_29_051211140552_create_1556514731140_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_29_051243316170_update_1556514763608_users_table.php: -------------------------------------------------------------------------------- 1 | longText('about')->nullable(); 13 | }); 14 | } 15 | 16 | public function down() 17 | { 18 | Schema::table('users', function (Blueprint $table) { 19 | }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/migrations/2019_04_29_051258210314_create_1556514778726_countries_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('name'); 14 | $table->string('short_code'); 15 | $table->timestamps(); 16 | $table->softDeletes(); 17 | }); 18 | } 19 | 20 | public function down() 21 | { 22 | Schema::dropIfExists('countries'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/migrations/2019_04_29_051327505359_update_1556514808851_users_table.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('country_id')->nullable(); 13 | $table->foreign('country_id')->references('id')->on('countries'); 14 | }); 15 | } 16 | 17 | public function down() 18 | { 19 | Schema::table('users', function (Blueprint $table) { 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/migrations/2019_04_29_051550536430_create_1556514953174_jobs_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->unsignedInteger('employer_id'); 14 | $table->foreign('employer_id')->references('id')->on('users'); 15 | $table->unsignedInteger('candidate_id')->nullable(); 16 | $table->foreign('candidate_id')->references('id')->on('users'); 17 | $table->string('title'); 18 | $table->longText('description'); 19 | $table->string('budget'); 20 | $table->date('delivery_date')->nullable(); 21 | $table->datetime('hired_at')->nullable(); 22 | $table->timestamps(); 23 | $table->softDeletes(); 24 | }); 25 | } 26 | 27 | public function down() 28 | { 29 | Schema::dropIfExists('jobs'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2019_04_29_051553003923_custom_1556514953003_create_media_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->morphs('model'); 14 | $table->string('collection_name'); 15 | $table->string('name'); 16 | $table->string('file_name'); 17 | $table->string('mime_type')->nullable(); 18 | $table->string('disk'); 19 | $table->unsignedInteger('size'); 20 | $table->json('manipulations'); 21 | $table->json('custom_properties'); 22 | $table->json('responsive_images'); 23 | $table->unsignedInteger('order_column')->nullable(); 24 | $table->nullableTimestamps(); 25 | }); 26 | } 27 | 28 | public function down() 29 | { 30 | Schema::dropIfExists('media'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_04_29_051823433434_create_1556515103983_proposals_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->unsignedInteger('job_id'); 14 | $table->foreign('job_id')->references('id')->on('jobs'); 15 | $table->unsignedInteger('candidate_id'); 16 | $table->foreign('candidate_id')->references('id')->on('users'); 17 | $table->longText('proposal_text'); 18 | $table->string('budget')->nullable(); 19 | $table->string('delivery_time')->nullable(); 20 | $table->datetime('approved_at')->nullable(); 21 | $table->datetime('rejected_at')->nullable(); 22 | $table->timestamps(); 23 | $table->softDeletes(); 24 | }); 25 | } 26 | 27 | public function down() 28 | { 29 | Schema::dropIfExists('proposals'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call([ 10 | PermissionsTableSeeder::class, 11 | RolesTableSeeder::class, 12 | PermissionRoleTableSeeder::class, 13 | UsersTableSeeder::class, 14 | RoleUserTableSeeder::class, 15 | CountriesTableSeeder::class, 16 | ]); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/seeds/PermissionRoleTableSeeder.php: -------------------------------------------------------------------------------- 1 | permissions()->sync($admin_permissions->pluck('id')); 13 | $employee_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($employee_permissions); 17 | 18 | $candidate_permissions = $admin_permissions->filter(function ($permission) { 19 | return substr($permission->title, 0, 5) != 'user_' 20 | && substr($permission->title, 0, 5) != 'role_' 21 | && substr($permission->title, 0, 11) != 'permission_' 22 | && substr($permission->title, 0, 8) != 'country_'; 23 | }); 24 | Role::findOrFail(3)->permissions()->sync($candidate_permissions); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/seeds/RoleUserTableSeeder.php: -------------------------------------------------------------------------------- 1 | roles()->sync(1); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /database/seeds/RolesTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 13 | 'title' => 'Admin', 14 | 'created_at' => '2019-04-29 05:12:11', 15 | 'updated_at' => '2019-04-29 05:12:11', 16 | 'deleted_at' => null, 17 | ], 18 | [ 19 | 'id' => 2, 20 | 'title' => 'Employee', 21 | 'created_at' => '2019-04-29 05:12:11', 22 | 'updated_at' => '2019-04-29 05:12:11', 23 | 'deleted_at' => null, 24 | ], 25 | [ 26 | 'id' => 3, 27 | 'title' => 'Candidate', 28 | 'created_at' => '2019-04-29 05:12:11', 29 | 'updated_at' => '2019-04-29 05:12:11', 30 | 'deleted_at' => null, 31 | ], 32 | ]; 33 | 34 | Role::insert($roles); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 12 | 'name' => 'Admin', 13 | 'email' => 'admin@admin.com', 14 | 'password' => '$2y$10$LMzZc4GPRnhpP/rzQDEOC.60ayJ9lWagbFM.U8cFm6AhyQ7XFR1iO', 15 | 'remember_token' => null, 16 | 'created_at' => '2019-04-29 05:18:44', 17 | 'updated_at' => '2019-04-29 05:18:44', 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 | } 15 | 16 | .dt-buttons .btn { 17 | margin-left: 0.333em; 18 | border-radius: 0; 19 | } 20 | 21 | .table.datatable { 22 | box-sizing: border-box; 23 | border-collapse: collapse; 24 | } 25 | 26 | .dataTables_wrapper.no-footer .dataTables_scrollBody { 27 | border-bottom: inherit; 28 | } 29 | 30 | table.dataTable thead .sorting, 31 | table.dataTable thead .sorting_asc, 32 | table.dataTable thead .sorting_desc { 33 | background-image: none; 34 | } 35 | 36 | .select2 { 37 | max-width: 100%; 38 | width: 100%; 39 | } 40 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LaravelDaily/Laravel-Job-Board-Demo/cb5f8a9b3eda08019ffd918470cf3c7cd5069b26/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 5.8 Freelance Job Board demo 2 | 3 | Simple project with job board like Upwork (but with just core features), with employers and candidates. 4 | 5 | Partly generated with our [QuickAdminPanel 2019](https://2019.quickadminpanel.com) and then live-coded within 1 hour in [this live-coding video](https://www.youtube.com/watch?v=Pi4u1xO8FOw). 6 | 7 | ![Laravel Job Board screenshot](https://laraveldaily.com/wp-content/uploads/2019/05/Screen-Shot-2019-05-21-at-11.27.33-AM.png) 8 | 9 | ![Laravel Job Board screenshot 2](https://laraveldaily.com/wp-content/uploads/2019/05/Screen-Shot-2019-05-21-at-11.29.09-AM.png) 10 | 11 | --- 12 | 13 | ## How to use 14 | 15 | - Clone the repository with __git clone__ 16 | - Copy __.env.example__ file to __.env__ and edit database credentials there 17 | - Run __composer install__ 18 | - Run __php artisan key:generate__ 19 | - Run __php artisan migrate --seed__ (it has some seeded data for your testing) 20 | - That's it: launch the main URL. 21 | - You can login to adminpanel with default credentials __admin@admin.com__ - __password__ 22 | - Also you can Register as Employer/Candidate and see their part of the app 23 | 24 | ## License 25 | 26 | Basically, feel free to use and re-use any way you want. 27 | 28 | --- 29 | 30 | ## More from our LaravelDaily Team 31 | 32 | - Check out our adminpanel generator [QuickAdminPanel](https:/2019.quickadminpanel.com) 33 | - Read our [Blog with Laravel Tutorials](https://laraveldaily.com) 34 | - FREE E-book: [50 Laravel Quick Tips (and counting)](https://laraveldaily.com/free-e-book-40-laravel-quick-tips-and-counting/) 35 | - Subscribe to our [YouTube channel Laravel Business](https://www.youtube.com/channel/UCTuplgOBi6tJIlesIboymGA) 36 | - Enroll in our [Laravel Online Courses](https://laraveldaily.teachable.com/) 37 | -------------------------------------------------------------------------------- /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/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/countries/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.create') }} {{ trans('global.country.title_singular') }} 11 |
12 |
13 | 14 |
15 | @csrf 16 |
17 | 18 | 19 | @if($errors->has('name')) 20 |

21 | {{ $errors->first('name') }} 22 |

23 | @endif 24 |

25 | {{ trans('global.country.fields.name_helper') }} 26 |

27 |
28 |
29 | 30 | 31 | @if($errors->has('short_code')) 32 |

33 | {{ $errors->first('short_code') }} 34 |

35 | @endif 36 |

37 | {{ trans('global.country.fields.short_code_helper') }} 38 |

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

22 | {{ $errors->first('name') }} 23 |

24 | @endif 25 |

26 | {{ trans('global.country.fields.name_helper') }} 27 |

28 |
29 |
30 | 31 | 32 | @if($errors->has('short_code')) 33 |

34 | {{ $errors->first('short_code') }} 35 |

36 | @endif 37 |

38 | {{ trans('global.country.fields.short_code_helper') }} 39 |

40 |
41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 | 49 |
50 |
51 |
52 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/countries/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.show') }} {{ trans('global.country.title') }} 11 |
12 |
13 | 14 | 15 | 16 | 17 | 20 | 23 | 24 | 25 | 28 | 31 | 32 | 33 |
18 | {{ trans('global.country.fields.name') }} 19 | 21 | {{ $country->name }} 22 |
26 | {{ trans('global.country.fields.short_code') }} 27 | 29 | {{ $country->short_code }} 30 |
34 | 35 |
36 |
37 | 38 |
39 |
40 |
41 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permissions/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.create') }} {{ trans('global.permission.title_singular') }} 11 |
12 |
13 | 14 |
15 | @csrf 16 |
17 | 18 | 19 | @if($errors->has('title')) 20 |

21 | {{ $errors->first('title') }} 22 |

23 | @endif 24 |

25 | {{ trans('global.permission.fields.title_helper') }} 26 |

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

22 | {{ $errors->first('title') }} 23 |

24 | @endif 25 |

26 | {{ trans('global.permission.fields.title_helper') }} 27 |

28 |
29 |
30 | 31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 |
40 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permissions/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.show') }} {{ trans('global.permission.title') }} 11 |
12 |
13 | 14 | 15 | 16 | 17 | 20 | 23 | 24 | 25 |
18 | {{ trans('global.permission.fields.title') }} 19 | 21 | {{ $permission->title }} 22 |
26 | 27 |
28 |
29 | 30 |
31 |
32 |
33 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/proposals/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.show') }} {{ trans('global.proposal.title') }} 11 |
12 |
13 | 14 | 15 | 16 | 17 | 20 | 23 | 24 | 25 | 28 | 31 | 32 | 33 | 36 | 39 | 40 | 41 | 44 | 47 | 48 | 49 | 52 | 55 | 56 | 57 | 60 | 63 | 64 | 65 |
18 | {{ trans('global.proposal.fields.job') }} 19 | 21 | {{ $proposal->job->title ?? '' }} 22 |
26 | {{ trans('global.proposal.fields.candidate') }} 27 | 29 | {{ $proposal->candidate->name ?? '' }} 30 |
34 | {{ trans('global.proposal.fields.proposal_text') }} 35 | 37 | {!! $proposal->proposal_text !!} 38 |
42 | {{ trans('global.proposal.fields.budget') }} 43 | 45 | {{ $proposal->budget }} 46 |
50 | {{ trans('global.proposal.fields.delivery_time') }} 51 | 53 | {{ $proposal->delivery_time }} 54 |
58 | {{ trans('global.proposal.fields.attachments') }} 59 | 61 | {{ $proposal->attachments }} 62 |
66 | 67 |
68 |
69 | 70 |
71 |
72 |
73 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/roles/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.create') }} {{ trans('global.role.title_singular') }} 11 |
12 |
13 | 14 |
15 | @csrf 16 |
17 | 18 | 19 | @if($errors->has('title')) 20 |

21 | {{ $errors->first('title') }} 22 |

23 | @endif 24 |

25 | {{ trans('global.role.fields.title_helper') }} 26 |

27 |
28 |
29 | 32 | 37 | @if($errors->has('permissions')) 38 |

39 | {{ $errors->first('permissions') }} 40 |

41 | @endif 42 |

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

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

22 | {{ $errors->first('title') }} 23 |

24 | @endif 25 |

26 | {{ trans('global.role.fields.title_helper') }} 27 |

28 |
29 |
30 | 33 | 38 | @if($errors->has('permissions')) 39 |

40 | {{ $errors->first('permissions') }} 41 |

42 | @endif 43 |

44 | {{ trans('global.role.fields.permissions_helper') }} 45 |

46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 |
58 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/roles/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.show') }} {{ trans('global.role.title') }} 11 |
12 |
13 | 14 | 15 | 16 | 17 | 20 | 23 | 24 | 25 | 28 | 33 | 34 | 35 |
18 | {{ trans('global.role.fields.title') }} 19 | 21 | {{ $role->title }} 22 |
26 | Permissions 27 | 29 | @foreach($role->permissions as $id => $permissions) 30 | {{ $permissions->title }} 31 | @endforeach 32 |
36 | 37 |
38 |
39 | 40 |
41 |
42 |
43 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/users/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 | {{ trans('global.show') }} {{ trans('global.user.title') }} 11 |
12 |
13 | 14 | 15 | 16 | 17 | 20 | 23 | 24 | 25 | 28 | 31 | 32 | 33 | 36 | 39 | 40 | 41 | 44 | 49 | 50 | 51 | 54 | 57 | 58 | 59 | 62 | 65 | 66 | 67 |
18 | {{ trans('global.user.fields.name') }} 19 | 21 | {{ $user->name }} 22 |
26 | {{ trans('global.user.fields.email') }} 27 | 29 | {{ $user->email }} 30 |
34 | {{ trans('global.user.fields.email_verified_at') }} 35 | 37 | {{ $user->email_verified_at }} 38 |
42 | Roles 43 | 45 | @foreach($user->roles as $id => $roles) 46 | {{ $roles->title }} 47 | @endforeach 48 |
52 | {{ trans('global.user.fields.about') }} 53 | 55 | {!! $user->about !!} 56 |
60 | {{ trans('global.user.fields.country') }} 61 | 63 | {{ $user->country->name ?? '' }} 64 |
68 | 69 |
70 |
71 | 72 |
73 |
74 |
75 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 | 58 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 | 38 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 | 55 | @endsection -------------------------------------------------------------------------------- /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() ?: 'The latest changes are not deployed yet. Please click "Deploy to Server" and wait for deployment to finish.')) 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 | Home 5 |
6 | @endsection 7 | @section('scripts') 8 | @parent 9 | 10 | @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 | @yield('content') 17 | 18 | 19 | -------------------------------------------------------------------------------- /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('countries', 'CountriesApiController'); 11 | 12 | Route::apiResource('jobs', 'JobsApiController'); 13 | 14 | Route::apiResource('proposals', 'ProposalsApiController'); 15 | }); 16 | -------------------------------------------------------------------------------- /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 | '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('countries/destroy', 'CountriesController@massDestroy')->name('countries.massDestroy'); 25 | 26 | Route::resource('countries', 'CountriesController'); 27 | 28 | Route::delete('jobs/destroy', 'JobsController@massDestroy')->name('jobs.massDestroy'); 29 | Route::resource('jobs', 'JobsController'); 30 | 31 | Route::post('jobs/media', 'JobsController@storeMedia')->name('jobs.storeMedia'); 32 | 33 | Route::delete('proposals/destroy', 'ProposalsController@massDestroy')->name('proposals.massDestroy'); 34 | 35 | Route::resource('proposals', 'ProposalsController'); 36 | 37 | Route::post('proposals/media', 'ProposalsController@storeMedia')->name('proposals.storeMedia'); 38 | }); 39 | -------------------------------------------------------------------------------- /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/CountriesTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) use ($admin) { 15 | $browser->loginAs($admin); 16 | $browser->visit(route('admin.countries.index')); 17 | $browser->assertRouteIs('admin.countries.index'); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/Browser/JobsTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) use ($admin) { 15 | $browser->loginAs($admin); 16 | $browser->visit(route('admin.jobs.index')); 17 | $browser->assertRouteIs('admin.jobs.index'); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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/ProposalsTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) use ($admin) { 15 | $browser->loginAs($admin); 16 | $browser->visit(route('admin.proposals.index')); 17 | $browser->assertRouteIs('admin.proposals.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 | --------------------------------------------------------------------------------