├── .editorconfig
├── .env.example
├── .gitattributes
├── .gitignore
├── README.md
├── app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Admin
│ │ │ ├── ClientReportController.php
│ │ │ ├── ContactCompanyController.php
│ │ │ ├── ContactContactsController.php
│ │ │ ├── ExpenseCategoryController.php
│ │ │ ├── ExpenseController.php
│ │ │ ├── ExpenseReportController.php
│ │ │ ├── HomeController.php
│ │ │ ├── IncomeCategoryController.php
│ │ │ ├── IncomeController.php
│ │ │ ├── PermissionsController.php
│ │ │ ├── RolesController.php
│ │ │ ├── TaskController.php
│ │ │ ├── TaskStatusController.php
│ │ │ ├── TaskTagController.php
│ │ │ ├── TasksCalendarController.php
│ │ │ └── UsersController.php
│ │ ├── Auth
│ │ │ ├── ChangePasswordController.php
│ │ │ ├── ConfirmPasswordController.php
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── LoginController.php
│ │ │ ├── RegisterController.php
│ │ │ ├── ResetPasswordController.php
│ │ │ └── VerificationController.php
│ │ ├── Controller.php
│ │ ├── HomeController.php
│ │ └── Traits
│ │ │ └── MediaUploadingTrait.php
│ ├── Kernel.php
│ ├── Middleware
│ │ ├── AuthGates.php
│ │ ├── Authenticate.php
│ │ ├── EncryptCookies.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── SetLocale.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
│ └── Requests
│ │ ├── MassDestroyContactCompanyRequest.php
│ │ ├── MassDestroyContactContactRequest.php
│ │ ├── MassDestroyExpenseCategoryRequest.php
│ │ ├── MassDestroyExpenseRequest.php
│ │ ├── MassDestroyIncomeCategoryRequest.php
│ │ ├── MassDestroyIncomeRequest.php
│ │ ├── MassDestroyPermissionRequest.php
│ │ ├── MassDestroyRoleRequest.php
│ │ ├── MassDestroyTaskRequest.php
│ │ ├── MassDestroyTaskStatusRequest.php
│ │ ├── MassDestroyTaskTagRequest.php
│ │ ├── MassDestroyUserRequest.php
│ │ ├── StoreContactCompanyRequest.php
│ │ ├── StoreContactContactRequest.php
│ │ ├── StoreExpenseCategoryRequest.php
│ │ ├── StoreExpenseRequest.php
│ │ ├── StoreIncomeCategoryRequest.php
│ │ ├── StoreIncomeRequest.php
│ │ ├── StorePermissionRequest.php
│ │ ├── StoreRoleRequest.php
│ │ ├── StoreTaskRequest.php
│ │ ├── StoreTaskStatusRequest.php
│ │ ├── StoreTaskTagRequest.php
│ │ ├── StoreUserRequest.php
│ │ ├── UpdateContactCompanyRequest.php
│ │ ├── UpdateContactContactRequest.php
│ │ ├── UpdateExpenseCategoryRequest.php
│ │ ├── UpdateExpenseRequest.php
│ │ ├── UpdateIncomeCategoryRequest.php
│ │ ├── UpdateIncomeRequest.php
│ │ ├── UpdatePasswordRequest.php
│ │ ├── UpdatePermissionRequest.php
│ │ ├── UpdateProfileRequest.php
│ │ ├── UpdateRoleRequest.php
│ │ ├── UpdateTaskRequest.php
│ │ ├── UpdateTaskStatusRequest.php
│ │ ├── UpdateTaskTagRequest.php
│ │ └── UpdateUserRequest.php
├── Models
│ ├── ContactCompany.php
│ ├── ContactContact.php
│ ├── Expense.php
│ ├── ExpenseCategory.php
│ ├── Income.php
│ ├── IncomeCategory.php
│ ├── Permission.php
│ ├── Role.php
│ ├── Task.php
│ ├── TaskStatus.php
│ ├── TaskTag.php
│ └── User.php
└── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── cors.php
├── database.php
├── filesystems.php
├── hashing.php
├── logging.php
├── mail.php
├── panel.php
├── queue.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2021_09_22_000001_create_media_table.php
│ ├── 2021_09_22_000002_create_permissions_table.php
│ ├── 2021_09_22_000003_create_tasks_table.php
│ ├── 2021_09_22_000004_create_task_tags_table.php
│ ├── 2021_09_22_000005_create_task_statuses_table.php
│ ├── 2021_09_22_000006_create_incomes_table.php
│ ├── 2021_09_22_000007_create_expenses_table.php
│ ├── 2021_09_22_000008_create_income_categories_table.php
│ ├── 2021_09_22_000009_create_expense_categories_table.php
│ ├── 2021_09_22_000010_create_contact_contacts_table.php
│ ├── 2021_09_22_000011_create_contact_companies_table.php
│ ├── 2021_09_22_000012_create_users_table.php
│ ├── 2021_09_22_000013_create_roles_table.php
│ ├── 2021_09_22_000014_create_role_user_pivot_table.php
│ ├── 2021_09_22_000015_create_permission_role_pivot_table.php
│ ├── 2021_09_22_000016_create_task_task_tag_pivot_table.php
│ ├── 2021_09_22_000017_add_relationship_fields_to_contact_contacts_table.php
│ ├── 2021_09_22_000018_add_relationship_fields_to_expenses_table.php
│ ├── 2021_09_22_000019_add_relationship_fields_to_incomes_table.php
│ └── 2021_09_22_000020_add_relationship_fields_to_tasks_table.php
└── seeders
│ ├── DatabaseSeeder.php
│ ├── PermissionRoleTableSeeder.php
│ ├── PermissionsTableSeeder.php
│ ├── RoleUserTableSeeder.php
│ ├── RolesTableSeeder.php
│ ├── TaskStatusTableSeeder.php
│ └── UsersTableSeeder.php
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── css
│ └── custom.css
├── favicon.ico
├── index.php
├── js
│ └── main.js
├── robots.txt
└── web.config
├── resources
├── css
│ └── app.css
├── js
│ ├── app.js
│ └── bootstrap.js
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── cruds.php
│ │ ├── global.php
│ │ ├── pagination.php
│ │ ├── panel.php
│ │ ├── passwords.php
│ │ └── validation.php
└── views
│ ├── admin
│ ├── clientReports
│ │ └── index.blade.php
│ ├── contactCompanies
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── contactContacts
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── expenseCategories
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── expenseReports
│ │ └── index.blade.php
│ ├── expenses
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── incomeCategories
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── incomes
│ │ ├── 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
│ ├── roles
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── taskStatuses
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── taskTags
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── tasks
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── tasksCalendars
│ │ └── index.blade.php
│ └── users
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── auth
│ ├── login.blade.php
│ ├── passwords
│ │ ├── confirm.blade.php
│ │ ├── edit.blade.php
│ │ ├── email.blade.php
│ │ └── reset.blade.php
│ ├── register.blade.php
│ └── verify.blade.php
│ ├── home.blade.php
│ ├── layouts
│ ├── admin.blade.php
│ └── app.blade.php
│ ├── partials
│ └── menu.blade.php
│ └── welcome.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ ├── .gitignore
│ │ └── data
│ │ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tests
├── Browser
│ ├── ContactCompanyTest.php
│ ├── ContactContactsTest.php
│ ├── ExpenseCategoryTest.php
│ ├── ExpenseTest.php
│ ├── IncomeCategoryTest.php
│ ├── IncomeTest.php
│ ├── PermissionsTest.php
│ ├── RolesTest.php
│ ├── TaskStatusTest.php
│ ├── TaskTagTest.php
│ ├── TaskTest.php
│ └── UsersTest.php
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
└── webpack.mix.js
/.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,yaml}]
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 | LOG_LEVEL=debug
9 |
10 | DB_CONNECTION=mysql
11 | DB_HOST=127.0.0.1
12 | DB_PORT=3306
13 | DB_DATABASE=laravel
14 | DB_USERNAME=root
15 | DB_PASSWORD=
16 |
17 | BROADCAST_DRIVER=log
18 | CACHE_DRIVER=file
19 | QUEUE_CONNECTION=sync
20 | SESSION_DRIVER=file
21 | SESSION_LIFETIME=120
22 |
23 | MEMCACHED_HOST=127.0.0.1
24 |
25 | REDIS_HOST=127.0.0.1
26 | REDIS_PASSWORD=null
27 | REDIS_PORT=6379
28 |
29 | MAIL_MAILER=smtp
30 | MAIL_HOST=mailhog
31 | MAIL_PORT=1025
32 | MAIL_USERNAME=null
33 | MAIL_PASSWORD=null
34 | MAIL_ENCRYPTION=null
35 | MAIL_FROM_ADDRESS=null
36 | MAIL_FROM_NAME="${APP_NAME}"
37 |
38 | AWS_ACCESS_KEY_ID=
39 | AWS_SECRET_ACCESS_KEY=
40 | AWS_DEFAULT_REGION=us-east-1
41 | AWS_BUCKET=
42 |
43 | PUSHER_APP_ID=
44 | PUSHER_APP_KEY=
45 | PUSHER_APP_SECRET=
46 | PUSHER_APP_CLUSTER=mt1
47 |
48 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
49 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
50 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | .env
7 | .env.backup
8 | .phpunit.result.cache
9 | docker-compose.override.yml
10 | Homestead.json
11 | Homestead.yaml
12 | npm-debug.log
13 | yarn-error.log
14 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')->hourly();
28 | }
29 |
30 | /**
31 | * Register the commands for the application.
32 | *
33 | * @return void
34 | */
35 | protected function commands()
36 | {
37 | $this->load(__DIR__.'/Commands');
38 |
39 | require base_path('routes/console.php');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | reportable(function (Throwable $e) {
37 | //
38 | });
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/ContactCompanyController.php:
--------------------------------------------------------------------------------
1 | all());
35 |
36 | return redirect()->route('admin.contact-companies.index');
37 | }
38 |
39 | public function edit(ContactCompany $contactCompany)
40 | {
41 | abort_if(Gate::denies('contact_company_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
42 |
43 | return view('admin.contactCompanies.edit', compact('contactCompany'));
44 | }
45 |
46 | public function update(UpdateContactCompanyRequest $request, ContactCompany $contactCompany)
47 | {
48 | $contactCompany->update($request->all());
49 |
50 | return redirect()->route('admin.contact-companies.index');
51 | }
52 |
53 | public function show(ContactCompany $contactCompany)
54 | {
55 | abort_if(Gate::denies('contact_company_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
56 |
57 | return view('admin.contactCompanies.show', compact('contactCompany'));
58 | }
59 |
60 | public function destroy(ContactCompany $contactCompany)
61 | {
62 | abort_if(Gate::denies('contact_company_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
63 |
64 | $contactCompany->delete();
65 |
66 | return back();
67 | }
68 |
69 | public function massDestroy(MassDestroyContactCompanyRequest $request)
70 | {
71 | ContactCompany::whereIn('id', request('ids'))->delete();
72 |
73 | return response(null, Response::HTTP_NO_CONTENT);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/ExpenseCategoryController.php:
--------------------------------------------------------------------------------
1 | all());
35 |
36 | return redirect()->route('admin.expense-categories.index');
37 | }
38 |
39 | public function edit(ExpenseCategory $expenseCategory)
40 | {
41 | abort_if(Gate::denies('expense_category_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
42 |
43 | return view('admin.expenseCategories.edit', compact('expenseCategory'));
44 | }
45 |
46 | public function update(UpdateExpenseCategoryRequest $request, ExpenseCategory $expenseCategory)
47 | {
48 | $expenseCategory->update($request->all());
49 |
50 | return redirect()->route('admin.expense-categories.index');
51 | }
52 |
53 | public function show(ExpenseCategory $expenseCategory)
54 | {
55 | abort_if(Gate::denies('expense_category_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
56 |
57 | return view('admin.expenseCategories.show', compact('expenseCategory'));
58 | }
59 |
60 | public function destroy(ExpenseCategory $expenseCategory)
61 | {
62 | abort_if(Gate::denies('expense_category_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
63 |
64 | $expenseCategory->delete();
65 |
66 | return back();
67 | }
68 |
69 | public function massDestroy(MassDestroyExpenseCategoryRequest $request)
70 | {
71 | ExpenseCategory::whereIn('id', request('ids'))->delete();
72 |
73 | return response(null, Response::HTTP_NO_CONTENT);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/ExpenseReportController.php:
--------------------------------------------------------------------------------
1 | query('y', Carbon::now()->year),
17 | request()->query('m', Carbon::now()->month)
18 | ));
19 | $to = clone $from;
20 | $to->day = $to->daysInMonth;
21 |
22 | $expenses = Expense::with('expense_category')
23 | ->whereBetween('entry_date', [$from, $to]);
24 |
25 | $incomes = Income::with('income_category')
26 | ->whereBetween('entry_date', [$from, $to]);
27 |
28 | $expensesTotal = $expenses->sum('amount');
29 | $incomesTotal = $incomes->sum('amount');
30 | $groupedExpenses = $expenses->whereNotNull('expense_category_id')->orderBy('amount', 'desc')->get()->groupBy('expense_category_id');
31 | $groupedIncomes = $incomes->whereNotNull('income_category_id')->orderBy('amount', 'desc')->get()->groupBy('income_category_id');
32 | $profit = $incomesTotal - $expensesTotal;
33 |
34 | $expensesSummary = [];
35 | foreach ($groupedExpenses as $exp) {
36 | foreach ($exp as $line) {
37 | if (!isset($expensesSummary[$line->expense_category->name])) {
38 | $expensesSummary[$line->expense_category->name] = [
39 | 'name' => $line->expense_category->name,
40 | 'amount' => 0,
41 | ];
42 | }
43 | $expensesSummary[$line->expense_category->name]['amount'] += $line->amount;
44 | }
45 | }
46 |
47 | $incomesSummary = [];
48 | foreach ($groupedIncomes as $inc) {
49 | foreach ($inc as $line) {
50 | if (!isset($incomesSummary[$line->income_category->name])) {
51 | $incomesSummary[$line->income_category->name] = [
52 | 'name' => $line->income_category->name,
53 | 'amount' => 0,
54 | ];
55 | }
56 | $incomesSummary[$line->income_category->name]['amount'] += $line->amount;
57 | }
58 | }
59 |
60 | return view('admin.expenseReports.index', compact(
61 | 'expensesSummary',
62 | 'incomesSummary',
63 | 'expensesTotal',
64 | 'incomesTotal',
65 | 'profit'
66 | ));
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/HomeController.php:
--------------------------------------------------------------------------------
1 | all());
35 |
36 | return redirect()->route('admin.income-categories.index');
37 | }
38 |
39 | public function edit(IncomeCategory $incomeCategory)
40 | {
41 | abort_if(Gate::denies('income_category_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
42 |
43 | return view('admin.incomeCategories.edit', compact('incomeCategory'));
44 | }
45 |
46 | public function update(UpdateIncomeCategoryRequest $request, IncomeCategory $incomeCategory)
47 | {
48 | $incomeCategory->update($request->all());
49 |
50 | return redirect()->route('admin.income-categories.index');
51 | }
52 |
53 | public function show(IncomeCategory $incomeCategory)
54 | {
55 | abort_if(Gate::denies('income_category_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
56 |
57 | return view('admin.incomeCategories.show', compact('incomeCategory'));
58 | }
59 |
60 | public function destroy(IncomeCategory $incomeCategory)
61 | {
62 | abort_if(Gate::denies('income_category_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
63 |
64 | $incomeCategory->delete();
65 |
66 | return back();
67 | }
68 |
69 | public function massDestroy(MassDestroyIncomeCategoryRequest $request)
70 | {
71 | IncomeCategory::whereIn('id', request('ids'))->delete();
72 |
73 | return response(null, Response::HTTP_NO_CONTENT);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/PermissionsController.php:
--------------------------------------------------------------------------------
1 | all());
35 |
36 | return redirect()->route('admin.permissions.index');
37 | }
38 |
39 | public function edit(Permission $permission)
40 | {
41 | abort_if(Gate::denies('permission_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
42 |
43 | return view('admin.permissions.edit', compact('permission'));
44 | }
45 |
46 | public function update(UpdatePermissionRequest $request, Permission $permission)
47 | {
48 | $permission->update($request->all());
49 |
50 | return redirect()->route('admin.permissions.index');
51 | }
52 |
53 | public function show(Permission $permission)
54 | {
55 | abort_if(Gate::denies('permission_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
56 |
57 | return view('admin.permissions.show', compact('permission'));
58 | }
59 |
60 | public function destroy(Permission $permission)
61 | {
62 | abort_if(Gate::denies('permission_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
63 |
64 | $permission->delete();
65 |
66 | return back();
67 | }
68 |
69 | public function massDestroy(MassDestroyPermissionRequest $request)
70 | {
71 | Permission::whereIn('id', request('ids'))->delete();
72 |
73 | return response(null, Response::HTTP_NO_CONTENT);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/RolesController.php:
--------------------------------------------------------------------------------
1 | get();
22 |
23 | return view('admin.roles.index', compact('roles'));
24 | }
25 |
26 | public function create()
27 | {
28 | abort_if(Gate::denies('role_create'), Response::HTTP_FORBIDDEN, '403 Forbidden');
29 |
30 | $permissions = Permission::pluck('title', 'id');
31 |
32 | return view('admin.roles.create', compact('permissions'));
33 | }
34 |
35 | public function store(StoreRoleRequest $request)
36 | {
37 | $role = Role::create($request->all());
38 | $role->permissions()->sync($request->input('permissions', []));
39 |
40 | return redirect()->route('admin.roles.index');
41 | }
42 |
43 | public function edit(Role $role)
44 | {
45 | abort_if(Gate::denies('role_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
46 |
47 | $permissions = Permission::pluck('title', 'id');
48 |
49 | $role->load('permissions');
50 |
51 | return view('admin.roles.edit', compact('permissions', 'role'));
52 | }
53 |
54 | public function update(UpdateRoleRequest $request, Role $role)
55 | {
56 | $role->update($request->all());
57 | $role->permissions()->sync($request->input('permissions', []));
58 |
59 | return redirect()->route('admin.roles.index');
60 | }
61 |
62 | public function show(Role $role)
63 | {
64 | abort_if(Gate::denies('role_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
65 |
66 | $role->load('permissions');
67 |
68 | return view('admin.roles.show', compact('role'));
69 | }
70 |
71 | public function destroy(Role $role)
72 | {
73 | abort_if(Gate::denies('role_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
74 |
75 | $role->delete();
76 |
77 | return back();
78 | }
79 |
80 | public function massDestroy(MassDestroyRoleRequest $request)
81 | {
82 | Role::whereIn('id', request('ids'))->delete();
83 |
84 | return response(null, Response::HTTP_NO_CONTENT);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/TaskStatusController.php:
--------------------------------------------------------------------------------
1 | all());
35 |
36 | return redirect()->route('admin.task-statuses.index');
37 | }
38 |
39 | public function edit(TaskStatus $taskStatus)
40 | {
41 | abort_if(Gate::denies('task_status_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
42 |
43 | return view('admin.taskStatuses.edit', compact('taskStatus'));
44 | }
45 |
46 | public function update(UpdateTaskStatusRequest $request, TaskStatus $taskStatus)
47 | {
48 | $taskStatus->update($request->all());
49 |
50 | return redirect()->route('admin.task-statuses.index');
51 | }
52 |
53 | public function show(TaskStatus $taskStatus)
54 | {
55 | abort_if(Gate::denies('task_status_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
56 |
57 | return view('admin.taskStatuses.show', compact('taskStatus'));
58 | }
59 |
60 | public function destroy(TaskStatus $taskStatus)
61 | {
62 | abort_if(Gate::denies('task_status_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
63 |
64 | $taskStatus->delete();
65 |
66 | return back();
67 | }
68 |
69 | public function massDestroy(MassDestroyTaskStatusRequest $request)
70 | {
71 | TaskStatus::whereIn('id', request('ids'))->delete();
72 |
73 | return response(null, Response::HTTP_NO_CONTENT);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/TaskTagController.php:
--------------------------------------------------------------------------------
1 | all());
35 |
36 | return redirect()->route('admin.task-tags.index');
37 | }
38 |
39 | public function edit(TaskTag $taskTag)
40 | {
41 | abort_if(Gate::denies('task_tag_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
42 |
43 | return view('admin.taskTags.edit', compact('taskTag'));
44 | }
45 |
46 | public function update(UpdateTaskTagRequest $request, TaskTag $taskTag)
47 | {
48 | $taskTag->update($request->all());
49 |
50 | return redirect()->route('admin.task-tags.index');
51 | }
52 |
53 | public function show(TaskTag $taskTag)
54 | {
55 | abort_if(Gate::denies('task_tag_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
56 |
57 | return view('admin.taskTags.show', compact('taskTag'));
58 | }
59 |
60 | public function destroy(TaskTag $taskTag)
61 | {
62 | abort_if(Gate::denies('task_tag_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
63 |
64 | $taskTag->delete();
65 |
66 | return back();
67 | }
68 |
69 | public function massDestroy(MassDestroyTaskTagRequest $request)
70 | {
71 | TaskTag::whereIn('id', request('ids'))->delete();
72 |
73 | return response(null, Response::HTTP_NO_CONTENT);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/TasksCalendarController.php:
--------------------------------------------------------------------------------
1 | get();
13 |
14 | return view('admin.tasksCalendars.index', compact('events'));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/UsersController.php:
--------------------------------------------------------------------------------
1 | get();
22 |
23 | return view('admin.users.index', compact('users'));
24 | }
25 |
26 | public function create()
27 | {
28 | abort_if(Gate::denies('user_create'), Response::HTTP_FORBIDDEN, '403 Forbidden');
29 |
30 | $roles = Role::pluck('title', 'id');
31 |
32 | return view('admin.users.create', compact('roles'));
33 | }
34 |
35 | public function store(StoreUserRequest $request)
36 | {
37 | $user = User::create($request->all());
38 | $user->roles()->sync($request->input('roles', []));
39 |
40 | return redirect()->route('admin.users.index');
41 | }
42 |
43 | public function edit(User $user)
44 | {
45 | abort_if(Gate::denies('user_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');
46 |
47 | $roles = Role::pluck('title', 'id');
48 |
49 | $user->load('roles');
50 |
51 | return view('admin.users.edit', compact('roles', 'user'));
52 | }
53 |
54 | public function update(UpdateUserRequest $request, User $user)
55 | {
56 | $user->update($request->all());
57 | $user->roles()->sync($request->input('roles', []));
58 |
59 | return redirect()->route('admin.users.index');
60 | }
61 |
62 | public function show(User $user)
63 | {
64 | abort_if(Gate::denies('user_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');
65 |
66 | $user->load('roles');
67 |
68 | return view('admin.users.show', compact('user'));
69 | }
70 |
71 | public function destroy(User $user)
72 | {
73 | abort_if(Gate::denies('user_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
74 |
75 | $user->delete();
76 |
77 | return back();
78 | }
79 |
80 | public function massDestroy(MassDestroyUserRequest $request)
81 | {
82 | User::whereIn('id', request('ids'))->delete();
83 |
84 | return response(null, Response::HTTP_NO_CONTENT);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ChangePasswordController.php:
--------------------------------------------------------------------------------
1 | user()->update($request->validated());
24 |
25 | return redirect()->route('profile.password.edit')->with('message', __('global.change_password_success'));
26 | }
27 |
28 | public function updateProfile(UpdateProfileRequest $request)
29 | {
30 | $user = auth()->user();
31 |
32 | $user->update($request->validated());
33 |
34 | return redirect()->route('profile.password.edit')->with('message', __('global.update_profile_success'));
35 | }
36 |
37 | public function destroy()
38 | {
39 | $user = auth()->user();
40 |
41 | $user->update([
42 | 'email' => time() . '_' . $user->email,
43 | ]);
44 |
45 | $user->delete();
46 |
47 | return redirect()->route('login')->with('message', __('global.delete_account_success'));
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ConfirmPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ForgotPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest')->except('logout');
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/RegisterController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
40 | }
41 |
42 | /**
43 | * Get a validator for an incoming registration request.
44 | *
45 | * @return \Illuminate\Contracts\Validation\Validator
46 | */
47 | protected function validator(array $data)
48 | {
49 | return Validator::make($data, [
50 | 'name' => ['required', 'string', 'max:255'],
51 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
52 | 'password' => ['required', 'string', 'min:8', 'confirmed'],
53 | ]);
54 | }
55 |
56 | /**
57 | * Create a new user instance after a valid registration.
58 | *
59 | * @return \App\User
60 | */
61 | protected function create(array $data)
62 | {
63 | return User::create([
64 | 'name' => $data['name'],
65 | 'email' => $data['email'],
66 | 'password' => Hash::make($data['password']),
67 | ]);
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ResetPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
39 | $this->middleware('signed')->only('verify');
40 | $this->middleware('throttle:6,1')->only('verify', 'resend');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
17 | }
18 |
19 | /**
20 | * Show the application dashboard.
21 | *
22 | * @return \Illuminate\Contracts\Support\Renderable
23 | */
24 | public function index()
25 | {
26 | return view('home');
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Traits/MediaUploadingTrait.php:
--------------------------------------------------------------------------------
1 | has('size')) {
13 | $this->validate(request(), [
14 | 'file' => 'max:' . request()->input('size') * 1024,
15 | ]);
16 | }
17 | // If width or height is preset - we are validating it as an image
18 | if (request()->has('width') || request()->has('height')) {
19 | $this->validate(request(), [
20 | 'file' => sprintf(
21 | 'image|dimensions:max_width=%s,max_height=%s',
22 | request()->input('width', 100000),
23 | request()->input('height', 100000)
24 | ),
25 | ]);
26 | }
27 |
28 | $path = storage_path('tmp/uploads');
29 |
30 | try {
31 | if (!file_exists($path)) {
32 | mkdir($path, 0755, true);
33 | }
34 | } catch (\Exception $e) {
35 | }
36 |
37 | $file = $request->file('file');
38 |
39 | $name = uniqid() . '_' . trim($file->getClientOriginalName());
40 |
41 | $file->move($path, $name);
42 |
43 | return response()->json([
44 | 'name' => $name,
45 | 'original_name' => $file->getClientOriginalName(),
46 | ]);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | \App\Http\Middleware\Authenticate::class,
21 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
22 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
23 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
24 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
25 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
26 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
27 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
28 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
29 | ];
30 |
31 | protected $middlewareGroups = [
32 | 'web' => [
33 | \App\Http\Middleware\EncryptCookies::class,
34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
35 | \Illuminate\Session\Middleware\StartSession::class,
36 | // \Illuminate\Session\Middleware\AuthenticateSession::class,
37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
38 | \App\Http\Middleware\VerifyCsrfToken::class,
39 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
40 | \App\Http\Middleware\AuthGates::class,
41 | \App\Http\Middleware\SetLocale::class,
42 | ],
43 | 'api' => [
44 | 'throttle:60,1',
45 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
46 | ],
47 | ];
48 | }
49 |
--------------------------------------------------------------------------------
/app/Http/Middleware/AuthGates.php:
--------------------------------------------------------------------------------
1 | get();
16 | $permissionsArray = [];
17 | foreach ($roles as $role) {
18 | foreach ($role->permissions as $permissions) {
19 | $permissionsArray[$permissions->title][] = $role->id;
20 | }
21 | }
22 | foreach ($permissionsArray as $title => $roles) {
23 | Gate::define($title, function ($user) use ($roles) {
24 | return count(array_intersect($user->roles->pluck('id')->toArray(), $roles)) > 0;
25 | });
26 | }
27 | }
28 |
29 | return $next($request);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | check()) {
26 | return redirect(RouteServiceProvider::HOME);
27 | }
28 | }
29 |
30 | return $next($request);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/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 | allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:contact_companies,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyContactContactRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:contact_contacts,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyExpenseCategoryRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:expense_categories,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyExpenseRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:expenses,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyIncomeCategoryRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:income_categories,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyIncomeRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:incomes,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyPermissionRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:permissions,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyRoleRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:roles,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyTaskRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:tasks,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyTaskStatusRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:task_statuses,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyTaskTagRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:task_tags,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/MassDestroyUserRequest.php:
--------------------------------------------------------------------------------
1 | 'required|array',
23 | 'ids.*' => 'exists:users,id',
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreContactCompanyRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'nullable',
23 | ],
24 | 'company_address' => [
25 | 'string',
26 | 'nullable',
27 | ],
28 | 'company_website' => [
29 | 'string',
30 | 'nullable',
31 | ],
32 | 'company_email' => [
33 | 'string',
34 | 'nullable',
35 | ],
36 | ];
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreContactContactRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'required',
22 | 'integer',
23 | ],
24 | 'contact_first_name' => [
25 | 'string',
26 | 'nullable',
27 | ],
28 | 'contact_last_name' => [
29 | 'string',
30 | 'nullable',
31 | ],
32 | 'contact_phone_1' => [
33 | 'string',
34 | 'nullable',
35 | ],
36 | 'contact_phone_2' => [
37 | 'string',
38 | 'nullable',
39 | ],
40 | 'contact_email' => [
41 | 'string',
42 | 'nullable',
43 | ],
44 | 'contact_skype' => [
45 | 'string',
46 | 'nullable',
47 | ],
48 | 'contact_address' => [
49 | 'string',
50 | 'nullable',
51 | ],
52 | ];
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreExpenseCategoryRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreExpenseRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'required',
22 | 'date_format:' . config('panel.date_format'),
23 | ],
24 | 'amount' => [
25 | 'required',
26 | ],
27 | 'description' => [
28 | 'string',
29 | 'nullable',
30 | ],
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreIncomeCategoryRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreIncomeRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'required',
22 | 'date_format:' . config('panel.date_format'),
23 | ],
24 | 'amount' => [
25 | 'required',
26 | ],
27 | 'description' => [
28 | 'string',
29 | 'nullable',
30 | ],
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Requests/StorePermissionRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreRoleRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | 'permissions.*' => [
25 | 'integer',
26 | ],
27 | 'permissions' => [
28 | 'required',
29 | 'array',
30 | ],
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreTaskRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | 'status_id' => [
25 | 'required',
26 | 'integer',
27 | ],
28 | 'tags.*' => [
29 | 'integer',
30 | ],
31 | 'tags' => [
32 | 'array',
33 | ],
34 | 'due_date' => [
35 | 'date_format:' . config('panel.date_format'),
36 | 'nullable',
37 | ],
38 | ];
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreTaskStatusRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreTaskTagRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/StoreUserRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | 'email' => [
25 | 'required',
26 | 'unique:users',
27 | ],
28 | 'password' => [
29 | 'required',
30 | ],
31 | 'roles.*' => [
32 | 'integer',
33 | ],
34 | 'roles' => [
35 | 'required',
36 | 'array',
37 | ],
38 | ];
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateContactCompanyRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'nullable',
23 | ],
24 | 'company_address' => [
25 | 'string',
26 | 'nullable',
27 | ],
28 | 'company_website' => [
29 | 'string',
30 | 'nullable',
31 | ],
32 | 'company_email' => [
33 | 'string',
34 | 'nullable',
35 | ],
36 | ];
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateContactContactRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'required',
22 | 'integer',
23 | ],
24 | 'contact_first_name' => [
25 | 'string',
26 | 'nullable',
27 | ],
28 | 'contact_last_name' => [
29 | 'string',
30 | 'nullable',
31 | ],
32 | 'contact_phone_1' => [
33 | 'string',
34 | 'nullable',
35 | ],
36 | 'contact_phone_2' => [
37 | 'string',
38 | 'nullable',
39 | ],
40 | 'contact_email' => [
41 | 'string',
42 | 'nullable',
43 | ],
44 | 'contact_skype' => [
45 | 'string',
46 | 'nullable',
47 | ],
48 | 'contact_address' => [
49 | 'string',
50 | 'nullable',
51 | ],
52 | ];
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateExpenseCategoryRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateExpenseRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'required',
22 | 'date_format:' . config('panel.date_format'),
23 | ],
24 | 'amount' => [
25 | 'required',
26 | ],
27 | 'description' => [
28 | 'string',
29 | 'nullable',
30 | ],
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateIncomeCategoryRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateIncomeRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'required',
22 | 'date_format:' . config('panel.date_format'),
23 | ],
24 | 'amount' => [
25 | 'required',
26 | ],
27 | 'description' => [
28 | 'string',
29 | 'nullable',
30 | ],
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdatePasswordRequest.php:
--------------------------------------------------------------------------------
1 | ['required', 'string', 'min:8', 'confirmed'],
33 | ];
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdatePermissionRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateProfileRequest.php:
--------------------------------------------------------------------------------
1 | ['required', 'string', 'max:255'],
33 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email,' . auth()->id()],
34 | ];
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateRoleRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | 'permissions.*' => [
25 | 'integer',
26 | ],
27 | 'permissions' => [
28 | 'required',
29 | 'array',
30 | ],
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateTaskRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | 'status_id' => [
25 | 'required',
26 | 'integer',
27 | ],
28 | 'tags.*' => [
29 | 'integer',
30 | ],
31 | 'tags' => [
32 | 'array',
33 | ],
34 | 'due_date' => [
35 | 'date_format:' . config('panel.date_format'),
36 | 'nullable',
37 | ],
38 | ];
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateTaskStatusRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateTaskTagRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Requests/UpdateUserRequest.php:
--------------------------------------------------------------------------------
1 | [
21 | 'string',
22 | 'required',
23 | ],
24 | 'email' => [
25 | 'required',
26 | 'unique:users,email,' . request()->route('user')->id,
27 | ],
28 | 'roles.*' => [
29 | 'integer',
30 | ],
31 | 'roles' => [
32 | 'required',
33 | 'array',
34 | ],
35 | ];
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/Models/ContactCompany.php:
--------------------------------------------------------------------------------
1 | format('Y-m-d H:i:s');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/Models/ContactContact.php:
--------------------------------------------------------------------------------
1 | belongsTo(ContactCompany::class, 'company_id');
40 | }
41 |
42 | protected function serializeDate(DateTimeInterface $date)
43 | {
44 | return $date->format('Y-m-d H:i:s');
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/Models/Expense.php:
--------------------------------------------------------------------------------
1 | belongsTo(ExpenseCategory::class, 'expense_category_id');
38 | }
39 |
40 | public function getEntryDateAttribute($value)
41 | {
42 | return $value ? Carbon::parse($value)->format(config('panel.date_format')) : null;
43 | }
44 |
45 | public function setEntryDateAttribute($value)
46 | {
47 | $this->attributes['entry_date'] = $value ? Carbon::createFromFormat(config('panel.date_format'), $value)->format('Y-m-d') : null;
48 | }
49 |
50 | protected function serializeDate(DateTimeInterface $date)
51 | {
52 | return $date->format('Y-m-d H:i:s');
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Models/ExpenseCategory.php:
--------------------------------------------------------------------------------
1 | format('Y-m-d H:i:s');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Models/Income.php:
--------------------------------------------------------------------------------
1 | belongsTo(IncomeCategory::class, 'income_category_id');
38 | }
39 |
40 | public function getEntryDateAttribute($value)
41 | {
42 | return $value ? Carbon::parse($value)->format(config('panel.date_format')) : null;
43 | }
44 |
45 | public function setEntryDateAttribute($value)
46 | {
47 | $this->attributes['entry_date'] = $value ? Carbon::createFromFormat(config('panel.date_format'), $value)->format('Y-m-d') : null;
48 | }
49 |
50 | protected function serializeDate(DateTimeInterface $date)
51 | {
52 | return $date->format('Y-m-d H:i:s');
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Models/IncomeCategory.php:
--------------------------------------------------------------------------------
1 | format('Y-m-d H:i:s');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Models/Permission.php:
--------------------------------------------------------------------------------
1 | format('Y-m-d H:i:s');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Models/Role.php:
--------------------------------------------------------------------------------
1 | belongsToMany(Permission::class);
33 | }
34 |
35 | protected function serializeDate(DateTimeInterface $date)
36 | {
37 | return $date->format('Y-m-d H:i:s');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Models/Task.php:
--------------------------------------------------------------------------------
1 | addMediaConversion('thumb')->fit('crop', 50, 50);
47 | $this->addMediaConversion('preview')->fit('crop', 120, 120);
48 | }
49 |
50 | public function status()
51 | {
52 | return $this->belongsTo(TaskStatus::class, 'status_id');
53 | }
54 |
55 | public function tags()
56 | {
57 | return $this->belongsToMany(TaskTag::class);
58 | }
59 |
60 | public function getAttachmentAttribute()
61 | {
62 | return $this->getMedia('attachment')->last();
63 | }
64 |
65 | public function getDueDateAttribute($value)
66 | {
67 | return $value ? Carbon::parse($value)->format(config('panel.date_format')) : null;
68 | }
69 |
70 | public function setDueDateAttribute($value)
71 | {
72 | $this->attributes['due_date'] = $value ? Carbon::createFromFormat(config('panel.date_format'), $value)->format('Y-m-d') : null;
73 | }
74 |
75 | public function assigned_to()
76 | {
77 | return $this->belongsTo(User::class, 'assigned_to_id');
78 | }
79 |
80 | protected function serializeDate(DateTimeInterface $date)
81 | {
82 | return $date->format('Y-m-d H:i:s');
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/app/Models/TaskStatus.php:
--------------------------------------------------------------------------------
1 | format('Y-m-d H:i:s');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Models/TaskTag.php:
--------------------------------------------------------------------------------
1 | format('Y-m-d H:i:s');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 | roles()->where('id', 1)->exists();
49 | }
50 |
51 | public function getEmailVerifiedAtAttribute($value)
52 | {
53 | return $value ? Carbon::createFromFormat('Y-m-d H:i:s', $value)->format(config('panel.date_format') . ' ' . config('panel.time_format')) : null;
54 | }
55 |
56 | public function setEmailVerifiedAtAttribute($value)
57 | {
58 | $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;
59 | }
60 |
61 | public function setPasswordAttribute($input)
62 | {
63 | if ($input) {
64 | $this->attributes['password'] = app('hash')->needsRehash($input) ? Hash::make($input) : $input;
65 | }
66 | }
67 |
68 | public function sendPasswordResetNotification($token)
69 | {
70 | $this->notify(new ResetPassword($token));
71 | }
72 |
73 | public function roles()
74 | {
75 | return $this->belongsToMany(Role::class);
76 | }
77 |
78 | protected function serializeDate(DateTimeInterface $date)
79 | {
80 | return $date->format('Y-m-d H:i:s');
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.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 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | configureRateLimiting();
37 |
38 | $this->routes(function () {
39 | Route::prefix('api')
40 | ->middleware('api')
41 | ->namespace($this->namespace)
42 | ->group(base_path('routes/api.php'));
43 |
44 | Route::middleware('web')
45 | ->namespace($this->namespace)
46 | ->group(base_path('routes/web.php'));
47 | });
48 | }
49 |
50 | /**
51 | * Configure the rate limiters for the application.
52 | */
53 | protected function configureRateLimiting(): void
54 | {
55 | RateLimiter::for('api', function (Request $request) {
56 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
57 | });
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/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.3|^8.0",
12 | "bugsnag/bugsnag-laravel": "^2.21",
13 | "doctrine/dbal": "^3.0",
14 | "fideloper/proxy": "^4.4",
15 | "fruitcake/laravel-cors": "^2.0",
16 | "guzzlehttp/guzzle": "^7.0.1",
17 | "laravel/dusk": "^6.11",
18 | "laravel/framework": "^8.12",
19 | "laravel/tinker": "^2.5",
20 | "yajra/laravel-datatables-oracle": "^9.18",
21 | "laravel/ui": "^3.3",
22 | "spatie/laravel-medialibrary": "^8.7"
23 | },
24 | "require-dev": {
25 | "facade/ignition": "^2.5",
26 | "fakerphp/faker": "^1.9.1",
27 | "laravel/sail": "^1.0.1",
28 | "mockery/mockery": "^1.4.2",
29 | "nunomaduro/collision": "^5.0",
30 | "phpunit/phpunit": "^9.3.3"
31 | },
32 | "config": {
33 | "optimize-autoloader": true,
34 | "preferred-install": "dist",
35 | "sort-packages": true
36 | },
37 | "extra": {
38 | "laravel": {
39 | "dont-discover": []
40 | }
41 | },
42 | "autoload": {
43 | "psr-4": {
44 | "App\\": "app/",
45 | "Database\\Factories\\": "database/factories/",
46 | "Database\\Seeders\\": "database/seeders/"
47 | }
48 | },
49 | "autoload-dev": {
50 | "psr-4": {
51 | "Tests\\": "tests/"
52 | }
53 | },
54 | "minimum-stability": "dev",
55 | "prefer-stable": true,
56 | "scripts": {
57 | "post-autoload-dump": [
58 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
59 | "@php artisan package:discover --ansi"
60 | ],
61 | "post-root-package-install": [
62 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
63 | ],
64 | "post-create-project-cmd": [
65 | "@php artisan key:generate --ansi"
66 | ]
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'ably' => [
45 | 'driver' => 'ably',
46 | 'key' => env('ABLY_KEY'),
47 | ],
48 |
49 | 'redis' => [
50 | 'driver' => 'redis',
51 | 'connection' => 'default',
52 | ],
53 |
54 | 'log' => [
55 | 'driver' => 'log',
56 | ],
57 |
58 | 'null' => [
59 | 'driver' => 'null',
60 | ],
61 |
62 | ],
63 |
64 | ];
65 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*', 'sanctum/csrf-cookie'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => ['*'],
23 |
24 | 'allowed_origins_patterns' => [],
25 |
26 | 'allowed_headers' => ['*'],
27 |
28 | 'exposed_headers' => [],
29 |
30 | 'max_age' => 0,
31 |
32 | 'supports_credentials' => false,
33 |
34 | ];
35 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Filesystem Disks
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure as many filesystem "disks" as you wish, and you
24 | | may even configure multiple disks of the same driver. Defaults have
25 | | been setup for each driver as an example of the required options.
26 | |
27 | | Supported Drivers: "local", "ftp", "sftp", "s3"
28 | |
29 | */
30 |
31 | 'disks' => [
32 |
33 | 'local' => [
34 | 'driver' => 'local',
35 | 'root' => storage_path('app'),
36 | ],
37 |
38 | 'public' => [
39 | 'driver' => 'local',
40 | 'root' => storage_path('app/public'),
41 | 'url' => env('APP_URL').'/storage',
42 | 'visibility' => 'public',
43 | ],
44 |
45 | 's3' => [
46 | 'driver' => 's3',
47 | 'key' => env('AWS_ACCESS_KEY_ID'),
48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
49 | 'region' => env('AWS_DEFAULT_REGION'),
50 | 'bucket' => env('AWS_BUCKET'),
51 | 'url' => env('AWS_URL'),
52 | 'endpoint' => env('AWS_ENDPOINT'),
53 | ],
54 |
55 | ],
56 |
57 | /*
58 | |--------------------------------------------------------------------------
59 | | Symbolic Links
60 | |--------------------------------------------------------------------------
61 | |
62 | | Here you may configure the symbolic links that will be created when the
63 | | `storage:link` Artisan command is executed. The array keys should be
64 | | the locations of the links and the values should be their targets.
65 | |
66 | */
67 |
68 | 'links' => [
69 | public_path('storage') => storage_path('app/public'),
70 | ],
71 |
72 | ];
73 |
--------------------------------------------------------------------------------
/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/panel.php:
--------------------------------------------------------------------------------
1 | 'Y-m-d',
5 | 'time_format' => 'H:i:s',
6 | 'primary_language' => 'en',
7 | 'available_languages' => [
8 | 'en' => 'English',
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(User::class, function (Faker $faker) {
21 | return [
22 | 'name' => $faker->name,
23 | 'email' => $faker->unique()->safeEmail,
24 | 'email_verified_at' => now(),
25 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
26 | 'remember_token' => Str::random(10),
27 | ];
28 | });
29 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
16 | $table->string('token');
17 | $table->timestamp('created_at')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | */
24 | public function down()
25 | {
26 | Schema::dropIfExists('password_resets');
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000001_create_media_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 |
14 | $table->morphs('model');
15 | $table->uuid('uuid')->nullable();
16 | $table->string('collection_name');
17 | $table->string('name');
18 | $table->string('file_name');
19 | $table->string('mime_type')->nullable();
20 | $table->string('disk');
21 | $table->string('conversions_disk')->nullable();
22 | $table->unsignedBigInteger('size');
23 | $table->json('manipulations');
24 | $table->json('custom_properties');
25 | $table->json('responsive_images');
26 | $table->unsignedInteger('order_column')->nullable();
27 |
28 | $table->nullableTimestamps();
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000002_create_permissions_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('title')->nullable();
14 | $table->timestamps();
15 | $table->softDeletes();
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000003_create_tasks_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('name')->nullable();
14 | $table->longText('description')->nullable();
15 | $table->date('due_date')->nullable();
16 | $table->timestamps();
17 | $table->softDeletes();
18 | });
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000004_create_task_tags_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('name')->nullable();
14 | $table->timestamps();
15 | $table->softDeletes();
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000005_create_task_statuses_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('name')->nullable();
14 | $table->timestamps();
15 | $table->softDeletes();
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000006_create_incomes_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->date('entry_date')->nullable();
14 | $table->decimal('amount', 15, 2)->nullable();
15 | $table->string('description')->nullable();
16 | $table->timestamps();
17 | $table->softDeletes();
18 | });
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000007_create_expenses_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->date('entry_date')->nullable();
14 | $table->decimal('amount', 15, 2)->nullable();
15 | $table->string('description')->nullable();
16 | $table->timestamps();
17 | $table->softDeletes();
18 | });
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000008_create_income_categories_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('name')->nullable();
14 | $table->timestamps();
15 | $table->softDeletes();
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000009_create_expense_categories_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('name')->nullable();
14 | $table->timestamps();
15 | $table->softDeletes();
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000010_create_contact_contacts_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('contact_first_name')->nullable();
14 | $table->string('contact_last_name')->nullable();
15 | $table->string('contact_phone_1')->nullable();
16 | $table->string('contact_phone_2')->nullable();
17 | $table->string('contact_email')->nullable();
18 | $table->string('contact_skype')->nullable();
19 | $table->string('contact_address')->nullable();
20 | $table->timestamps();
21 | $table->softDeletes();
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000011_create_contact_companies_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('company_name')->nullable();
14 | $table->string('company_address')->nullable();
15 | $table->string('company_website')->nullable();
16 | $table->string('company_email')->nullable();
17 | $table->timestamps();
18 | $table->softDeletes();
19 | });
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000012_create_users_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('name');
14 | $table->string('email')->unique();
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 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000013_create_roles_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
13 | $table->string('title')->nullable();
14 | $table->timestamps();
15 | $table->softDeletes();
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000014_create_role_user_pivot_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('user_id');
13 | $table->foreign('user_id', 'user_id_fk_4933085')->references('id')->on('users')->onDelete('cascade');
14 | $table->unsignedBigInteger('role_id');
15 | $table->foreign('role_id', 'role_id_fk_4933085')->references('id')->on('roles')->onDelete('cascade');
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000015_create_permission_role_pivot_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('role_id');
13 | $table->foreign('role_id', 'role_id_fk_4933076')->references('id')->on('roles')->onDelete('cascade');
14 | $table->unsignedBigInteger('permission_id');
15 | $table->foreign('permission_id', 'permission_id_fk_4933076')->references('id')->on('permissions')->onDelete('cascade');
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000016_create_task_task_tag_pivot_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('task_id');
13 | $table->foreign('task_id', 'task_id_fk_4933150')->references('id')->on('tasks')->onDelete('cascade');
14 | $table->unsignedBigInteger('task_tag_id');
15 | $table->foreign('task_tag_id', 'task_tag_id_fk_4933150')->references('id')->on('task_tags')->onDelete('cascade');
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000017_add_relationship_fields_to_contact_contacts_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('company_id')->nullable();
13 | $table->foreign('company_id', 'company_fk_4933099')->references('id')->on('contact_companies');
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000018_add_relationship_fields_to_expenses_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('expense_category_id')->nullable();
13 | $table->foreign('expense_category_id', 'expense_category_fk_4933121')->references('id')->on('expense_categories');
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000019_add_relationship_fields_to_incomes_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('income_category_id')->nullable();
13 | $table->foreign('income_category_id', 'income_category_fk_4933129')->references('id')->on('income_categories');
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/database/migrations/2021_09_22_000020_add_relationship_fields_to_tasks_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('status_id')->nullable();
13 | $table->foreign('status_id', 'status_fk_4933149')->references('id')->on('task_statuses');
14 | $table->unsignedBigInteger('assigned_to_id')->nullable();
15 | $table->foreign('assigned_to_id', 'assigned_to_fk_4933153')->references('id')->on('users');
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call([
12 | PermissionsTableSeeder::class,
13 | RolesTableSeeder::class,
14 | PermissionRoleTableSeeder::class,
15 | UsersTableSeeder::class,
16 | RoleUserTableSeeder::class,
17 | TaskStatusTableSeeder::class,
18 | ]);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/database/seeders/PermissionRoleTableSeeder.php:
--------------------------------------------------------------------------------
1 | permissions()->sync($admin_permissions->pluck('id'));
15 | $user_permissions = $admin_permissions->filter(function ($permission) {
16 | return substr($permission->title, 0, 5) != 'user_' && substr($permission->title, 0, 5) != 'role_' && substr($permission->title, 0, 11) != 'permission_';
17 | });
18 | Role::findOrFail(2)->permissions()->sync($user_permissions);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/database/seeders/RoleUserTableSeeder.php:
--------------------------------------------------------------------------------
1 | roles()->sync(1);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/database/seeders/RolesTableSeeder.php:
--------------------------------------------------------------------------------
1 | 1,
15 | 'title' => 'Admin',
16 | ],
17 | [
18 | 'id' => 2,
19 | 'title' => 'User',
20 | ],
21 | ];
22 |
23 | Role::insert($roles);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/seeders/TaskStatusTableSeeder.php:
--------------------------------------------------------------------------------
1 | 1,
15 | 'name' => 'Open',
16 | ],
17 | [
18 | 'id' => 2,
19 | 'name' => 'In progress',
20 | ],
21 | [
22 | 'id' => 3,
23 | 'name' => 'Closed',
24 | ],
25 | ];
26 |
27 | TaskStatus::insert($taskStatuses);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/database/seeders/UsersTableSeeder.php:
--------------------------------------------------------------------------------
1 | 1,
15 | 'name' => 'Admin',
16 | 'email' => 'admin@admin.com',
17 | 'password' => bcrypt('password'),
18 | 'remember_token' => null,
19 | ],
20 | ];
21 |
22 | User::insert($users);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "mix",
6 | "watch": "mix watch",
7 | "watch-poll": "mix watch -- --watch-options-poll=1000",
8 | "hot": "mix watch --hot",
9 | "prod": "npm run production",
10 | "production": "mix --production"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.21",
14 | "laravel-mix": "^6.0.6",
15 | "lodash": "^4.17.19",
16 | "postcss": "^8.1.14"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | ./tests/Unit
10 |
11 |
12 | ./tests/Feature
13 |
14 |
15 |
16 |
17 | ./app
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews -Indexes
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Handle Authorization Header
9 | RewriteCond %{HTTP:Authorization} .
10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11 |
12 | # Redirect Trailing Slashes If Not A Folder...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_URI} (.+)/$
15 | RewriteRule ^ %1 [L,R=301]
16 |
17 | # Send Requests To Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-AdminPanel-Modules-Demo/2bc445741dd955c722adbaf47bb490a39b3922f8/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class);
50 |
51 | $response = tap($kernel->handle(
52 | $request = Request::capture()
53 | ))->send();
54 |
55 | $kernel->terminate($request, $response);
56 |
--------------------------------------------------------------------------------
/public/js/main.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | window._token = $('meta[name="csrf-token"]').attr('content')
3 |
4 | moment.updateLocale('en', {
5 | week: {dow: 1} // Monday is the first day of the week
6 | })
7 |
8 | $('.date').datetimepicker({
9 | format: 'YYYY-MM-DD',
10 | locale: 'en',
11 | icons: {
12 | up: 'fas fa-chevron-up',
13 | down: 'fas fa-chevron-down',
14 | previous: 'fas fa-chevron-left',
15 | next: 'fas fa-chevron-right'
16 | }
17 | })
18 |
19 | $('.datetime').datetimepicker({
20 | format: 'YYYY-MM-DD HH:mm:ss',
21 | locale: 'en',
22 | sideBySide: true,
23 | icons: {
24 | up: 'fas fa-chevron-up',
25 | down: 'fas fa-chevron-down',
26 | previous: 'fas fa-chevron-left',
27 | next: 'fas fa-chevron-right'
28 | }
29 | })
30 |
31 | $('.timepicker').datetimepicker({
32 | format: 'HH:mm:ss',
33 | icons: {
34 | up: 'fas fa-chevron-up',
35 | down: 'fas fa-chevron-down',
36 | previous: 'fas fa-chevron-left',
37 | next: 'fas fa-chevron-right'
38 | }
39 | })
40 |
41 | $('.select-all').click(function () {
42 | let $select2 = $(this).parent().siblings('.select2')
43 | $select2.find('option').prop('selected', 'selected')
44 | $select2.trigger('change')
45 | })
46 | $('.deselect-all').click(function () {
47 | let $select2 = $(this).parent().siblings('.select2')
48 | $select2.find('option').prop('selected', '')
49 | $select2.trigger('change')
50 | })
51 |
52 | $('.select2').select2()
53 |
54 | $('.treeview').each(function () {
55 | var shouldExpand = false
56 | $(this).find('li').each(function () {
57 | if ($(this).hasClass('active')) {
58 | shouldExpand = true
59 | }
60 | })
61 | if (shouldExpand) {
62 | $(this).addClass('active')
63 | }
64 | })
65 |
66 | $('.c-header-toggler.mfs-3.d-md-down-none').click(function (e) {
67 | $('#sidebar').toggleClass('c-sidebar-lg-show');
68 |
69 | setTimeout(function () {
70 | $($.fn.dataTable.tables(true)).DataTable().columns.adjust();
71 | }, 400);
72 | });
73 |
74 | })
75 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/public/web.config:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/resources/css/app.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaravelDaily/Laravel-AdminPanel-Modules-Demo/2bc445741dd955c722adbaf47bb490a39b3922f8/resources/css/app.css
--------------------------------------------------------------------------------
/resources/js/app.js:
--------------------------------------------------------------------------------
1 | require('./bootstrap');
2 |
--------------------------------------------------------------------------------
/resources/js/bootstrap.js:
--------------------------------------------------------------------------------
1 | window._ = require('lodash');
2 |
3 | /**
4 | * We'll load the axios HTTP library which allows us to easily issue requests
5 | * to our Laravel back-end. This library automatically handles sending the
6 | * CSRF token as a header based on the value of the "XSRF" token cookie.
7 | */
8 |
9 | window.axios = require('axios');
10 |
11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
12 |
13 | /**
14 | * Echo exposes an expressive API for subscribing to channels and listening
15 | * for events that are broadcast by Laravel. Echo and event broadcasting
16 | * allows your team to easily build robust real-time web applications.
17 | */
18 |
19 | // import Echo from 'laravel-echo';
20 |
21 | // window.Pusher = require('pusher-js');
22 |
23 | // window.Echo = new Echo({
24 | // broadcaster: 'pusher',
25 | // key: process.env.MIX_PUSHER_APP_KEY,
26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER,
27 | // forceTLS: true
28 | // });
29 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
5 | 'password' => 'The provided password is incorrect.',
6 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
7 | ];
8 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
5 | 'next' => 'Next »',
6 | ];
7 |
--------------------------------------------------------------------------------
/resources/lang/en/panel.php:
--------------------------------------------------------------------------------
1 | 'Modules',
5 | ];
6 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
5 | 'reset' => 'Your password has been reset!',
6 | 'sent' => 'We have e-mailed your password reset link!',
7 | 'token' => 'This password reset token is invalid.',
8 | 'user' => 'We can\'t find a user with that e-mail address.',
9 | 'updated' => 'Your password has been changed!',
10 | ];
11 |
--------------------------------------------------------------------------------
/resources/views/admin/expenseCategories/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
30 |
31 |
32 |
33 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/expenseCategories/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
31 |
32 |
33 |
34 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/expenseCategories/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
44 |
45 |
46 |
47 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/expenses/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
68 |
69 |
70 |
71 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/incomeCategories/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
30 |
31 |
32 |
33 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/incomeCategories/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
31 |
32 |
33 |
34 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/incomeCategories/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
44 |
45 |
46 |
47 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/incomes/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
68 |
69 |
70 |
71 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/permissions/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
30 |
31 |
32 |
33 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/permissions/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
31 |
32 |
33 |
34 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/permissions/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
44 |
45 |
46 |
47 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/roles/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
48 |
49 |
50 |
51 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/roles/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
49 |
50 |
51 |
52 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/roles/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
54 |
55 |
56 |
57 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/taskStatuses/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
30 |
31 |
32 |
33 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/taskStatuses/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
31 |
32 |
33 |
34 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/taskStatuses/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
44 |
45 |
46 |
47 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/taskTags/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
30 |
31 |
32 |
33 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/taskTags/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
31 |
32 |
33 |
34 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/taskTags/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
44 |
45 |
46 |
47 | @endsection
--------------------------------------------------------------------------------
/resources/views/admin/tasksCalendars/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
15 |
16 |
17 |
18 | @endsection
19 |
20 | @section('scripts')
21 | @parent
22 |
23 |
24 |
43 |
44 | @stop
--------------------------------------------------------------------------------
/resources/views/auth/passwords/confirm.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{ __('Please confirm your password before continuing.') }}
13 |
14 |
15 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | @endsection
--------------------------------------------------------------------------------
/resources/views/auth/passwords/email.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 | @section('content')
3 |
4 |
5 |
6 |
7 |
{{ trans('panel.site_title') }}
8 |
9 |
{{ trans('global.reset_password') }}
10 |
11 | @if(session('status'))
12 |
13 | {{ session('status') }}
14 |
15 | @endif
16 |
17 |
38 |
39 |
40 |
41 |
42 | @endsection
--------------------------------------------------------------------------------
/resources/views/auth/passwords/reset.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 | @section('content')
3 |
4 |
5 |
6 |
7 |
{{ trans('panel.site_title') }}
8 |
9 |
{{ trans('global.reset_password') }}
10 |
11 |
46 |
47 |
48 |
49 |
50 | @endsection
--------------------------------------------------------------------------------
/resources/views/auth/verify.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | @if (session('resent'))
12 |
13 | {{ __('A fresh verification link has been sent to your email address.') }}
14 |
15 | @endif
16 |
17 | {{ __('Before proceeding, please check your email for a verification link.') }}
18 | {{ __('If you did not receive the email') }},
19 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection
29 |
--------------------------------------------------------------------------------
/resources/views/home.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.admin')
2 | @section('content')
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 | @if(session('status'))
13 |
14 | {{ session('status') }}
15 |
16 | @endif
17 |
18 | You are logged in!
19 |
20 |
21 |
22 |
23 |
24 | @endsection
25 | @section('scripts')
26 | @parent
27 |
28 | @endsection
--------------------------------------------------------------------------------
/resources/views/layouts/app.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ trans('panel.site_title') }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | @yield('styles')
22 |
23 |
24 |
25 |
26 |
27 | @yield("content")
28 |
29 |
30 | @yield('scripts')
31 |
32 |
33 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | 'v1', 'as' => 'api.', 'namespace' => 'Api\V1\Admin', 'middleware' => ['auth:sanctum']], function () {
4 | });
5 |
--------------------------------------------------------------------------------
/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
18 | });
19 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
19 | })->purpose('Display an inspiring quote');
20 |
--------------------------------------------------------------------------------
/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 | compiled.php
2 | config.php
3 | down
4 | events.scanned.php
5 | maintenance.php
6 | routes.php
7 | routes.scanned.php
8 | schedule-*
9 | services.json
10 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/framework/cache/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/tests/Browser/ContactCompanyTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.contactcompany.index'));
21 | $browser->assertRouteIs('admin.contactcompany.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/ContactContactsTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.contactcontacts.index'));
21 | $browser->assertRouteIs('admin.contactcontacts.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/ExpenseCategoryTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.expensecategory.index'));
21 | $browser->assertRouteIs('admin.expensecategory.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/ExpenseTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.expense.index'));
21 | $browser->assertRouteIs('admin.expense.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/IncomeCategoryTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.incomecategory.index'));
21 | $browser->assertRouteIs('admin.incomecategory.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/IncomeTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.income.index'));
21 | $browser->assertRouteIs('admin.income.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/PermissionsTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.permissions.index'));
21 | $browser->assertRouteIs('admin.permissions.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/RolesTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.roles.index'));
21 | $browser->assertRouteIs('admin.roles.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/TaskStatusTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.taskstatus.index'));
21 | $browser->assertRouteIs('admin.taskstatus.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/TaskTagTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.tasktag.index'));
21 | $browser->assertRouteIs('admin.tasktag.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/TaskTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.task.index'));
21 | $browser->assertRouteIs('admin.task.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/Browser/UsersTest.php:
--------------------------------------------------------------------------------
1 | browse(function (Browser $browser) use ($admin) {
19 | $browser->loginAs($admin);
20 | $browser->visit(route('admin.users.index'));
21 | $browser->assertRouteIs('admin.users.index');
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/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);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/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 applications. By default, we are compiling the CSS
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 | .postCss('resources/css/app.css', 'public/css', [
16 | //
17 | ]);
18 |
--------------------------------------------------------------------------------