├── .editorconfig
├── .env.example
├── .gitattributes
├── .gitignore
├── .gitpod.Dockerfile
├── .gitpod.yml
├── .styleci.yml
├── README.md
├── app
├── Actions
│ ├── Fortify
│ │ ├── CreateNewUser.php
│ │ ├── PasswordValidationRules.php
│ │ ├── ResetUserPassword.php
│ │ ├── UpdateUserPassword.php
│ │ └── UpdateUserProfileInformation.php
│ └── Jetstream
│ │ ├── AddTeamMember.php
│ │ ├── CreateTeam.php
│ │ ├── DeleteTeam.php
│ │ ├── DeleteUser.php
│ │ └── UpdateTeamName.php
├── Console
│ ├── Commands
│ │ └── LivewireCustomCrudCommand.php
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ └── Controller.php
│ ├── Kernel.php
│ ├── Livewire
│ │ ├── ChatComponent.php
│ │ ├── Frontpage.php
│ │ ├── NavigationMenus.php
│ │ ├── Pages.php
│ │ ├── UserPermissions.php
│ │ └── Users.php
│ └── Middleware
│ │ ├── Authenticate.php
│ │ ├── EncryptCookies.php
│ │ ├── EnsureUserRoleIsAllowedToAccess.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
├── Models
│ ├── Membership.php
│ ├── Message.php
│ ├── NavigationMenu.php
│ ├── Page.php
│ ├── Team.php
│ ├── User.php
│ └── UserPermission.php
├── Policies
│ └── TeamPolicy.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ ├── FortifyServiceProvider.php
│ ├── JetstreamServiceProvider.php
│ └── RouteServiceProvider.php
└── View
│ └── Components
│ ├── AppLayout.php
│ └── GuestLayout.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
├── fortify.php
├── hashing.php
├── jetstream.php
├── laravel-trix.php
├── logging.php
├── mail.php
├── queue.php
├── sanctum.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2014_10_12_200000_add_two_factor_columns_to_users_table.php
│ ├── 2019_08_19_000000_create_failed_jobs_table.php
│ ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│ ├── 2020_05_21_100000_create_teams_table.php
│ ├── 2020_05_21_200000_create_team_user_table.php
│ ├── 2020_10_15_081242_create_sessions_table.php
│ ├── 2020_10_25_145528_create_pages_table.php
│ ├── 2020_10_25_150627_create_trix_rich_texts_table.php
│ ├── 2020_11_07_161745_add_set_default_pages_to_pages_table.php
│ ├── 2020_12_23_113233_create_navigation_menus_table.php
│ ├── 2021_01_04_051353_add_role_to_users_table.php
│ ├── 2021_01_18_040001_create_user_permissions_table.php
│ └── 2021_03_07_085741_create_messages_table.php
└── seeders
│ └── DatabaseSeeder.php
├── package-lock.json
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── css
│ ├── app.css
│ └── chat.css
├── favicon.ico
├── img
│ └── logo.svg
├── index.php
├── js
│ ├── app.js
│ └── socket.js
├── mix-manifest.json
├── robots.txt
└── web.config
├── resources
├── css
│ └── app.css
├── js
│ ├── app.js
│ └── bootstrap.js
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
└── views
│ ├── admin
│ ├── navigation-menus.blade.php
│ ├── pages.blade.php
│ ├── user-permissions.blade.php
│ └── users.blade.php
│ ├── api
│ ├── api-token-manager.blade.php
│ └── index.blade.php
│ ├── auth
│ ├── forgot-password.blade.php
│ ├── login.blade.php
│ ├── register.blade.php
│ ├── reset-password.blade.php
│ ├── two-factor-challenge.blade.php
│ └── verify-email.blade.php
│ ├── dashboard.blade.php
│ ├── layouts
│ ├── app.blade.php
│ ├── frontpage.blade.php
│ └── guest.blade.php
│ ├── livewire
│ ├── chat-component.blade.php
│ ├── frontpage.blade.php
│ ├── navigation-menus.blade.php
│ ├── pages.blade.php
│ ├── user-permissions.blade.php
│ └── users.blade.php
│ ├── navigation-dropdown.blade.php
│ ├── profile
│ ├── delete-user-form.blade.php
│ ├── logout-other-browser-sessions-form.blade.php
│ ├── show.blade.php
│ ├── two-factor-authentication-form.blade.php
│ ├── update-password-form.blade.php
│ └── update-profile-information-form.blade.php
│ ├── teams
│ ├── create-team-form.blade.php
│ ├── create.blade.php
│ ├── delete-team-form.blade.php
│ ├── show.blade.php
│ ├── team-member-manager.blade.php
│ └── update-team-name-form.blade.php
│ ├── vendor
│ └── jetstream
│ │ └── components
│ │ ├── action-message.blade.php
│ │ ├── action-section.blade.php
│ │ ├── application-logo.blade.php
│ │ ├── application-mark.blade.php
│ │ ├── authentication-card-logo.blade.php
│ │ ├── authentication-card.blade.php
│ │ ├── button.blade.php
│ │ ├── confirmation-modal.blade.php
│ │ ├── confirms-password.blade.php
│ │ ├── danger-button.blade.php
│ │ ├── dialog-modal.blade.php
│ │ ├── dropdown-link.blade.php
│ │ ├── dropdown.blade.php
│ │ ├── form-section.blade.php
│ │ ├── input-error.blade.php
│ │ ├── input.blade.php
│ │ ├── label.blade.php
│ │ ├── modal.blade.php
│ │ ├── nav-link.blade.php
│ │ ├── responsive-nav-link.blade.php
│ │ ├── secondary-button.blade.php
│ │ ├── section-border.blade.php
│ │ ├── section-title.blade.php
│ │ ├── switchable-team.blade.php
│ │ ├── validation-errors.blade.php
│ │ └── welcome.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
├── stubs
├── console.stub
├── controller.api.stub
├── controller.invokable.stub
├── controller.model.api.stub
├── controller.model.stub
├── controller.nested.api.stub
├── controller.nested.stub
├── controller.plain.stub
├── controller.stub
├── custom.livewire.crud.stub
├── custom.livewire.crud.view.stub
├── factory.stub
├── job.queued.stub
├── job.stub
├── middleware.stub
├── migration.create.stub
├── migration.stub
├── migration.update.stub
├── model.pivot.stub
├── model.stub
├── policy.plain.stub
├── policy.stub
├── request.stub
├── resource-collection.stub
├── resource.stub
├── rule.stub
├── seeder.stub
├── test.stub
└── test.unit.stub
├── tailwind.config.js
├── tests
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
├── webpack.mix.js
└── websocket
├── .gitignore
├── chatServer.js
├── eventNotificationServer.js
├── package-lock.json
└── package.json
/.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 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=laravel
13 | DB_USERNAME=root
14 | DB_PASSWORD=
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=database
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_MAILER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 | MAIL_FROM_ADDRESS=null
33 | MAIL_FROM_NAME="${APP_NAME}"
34 |
35 | AWS_ACCESS_KEY_ID=
36 | AWS_SECRET_ACCESS_KEY=
37 | AWS_DEFAULT_REGION=us-east-1
38 | AWS_BUCKET=
39 |
40 | PUSHER_APP_ID=
41 | PUSHER_APP_KEY=
42 | PUSHER_APP_SECRET=
43 | PUSHER_APP_CLUSTER=mt1
44 |
45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
47 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | .env
7 | .env.backup
8 | .phpunit.result.cache
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 |
--------------------------------------------------------------------------------
/.gitpod.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM gitpod/workspace-full
2 |
3 | # Install custom tools, runtimes, etc.
4 | # For example "bastet", a command-line tetris clone:
5 | # RUN brew install bastet
6 | #
7 | # More information: https://www.gitpod.io/docs/config-docker/
8 |
--------------------------------------------------------------------------------
/.gitpod.yml:
--------------------------------------------------------------------------------
1 | image:
2 | file: .gitpod.Dockerfile
3 |
4 | tasks:
5 | - init: composer install
6 | command: composer install ; php artisan key:generate ; php artisan migrate ; php artisan serv
7 |
--------------------------------------------------------------------------------
/.styleci.yml:
--------------------------------------------------------------------------------
1 | php:
2 | preset: laravel
3 | disabled:
4 | - no_unused_imports
5 | finder:
6 | not-name:
7 | - index.php
8 | - server.php
9 | js:
10 | finder:
11 | not-name:
12 | - webpack.mix.js
13 | css: true
14 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/CreateNewUser.php:
--------------------------------------------------------------------------------
1 | ['required', 'string', 'max:255'],
26 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
27 | 'password' => $this->passwordRules(),
28 | ])->validate();
29 |
30 | return DB::transaction(function () use ($input) {
31 | return tap(User::create([
32 | 'name' => $input['name'],
33 | 'email' => $input['email'],
34 | 'password' => Hash::make($input['password']),
35 | ]), function (User $user) {
36 | $this->createTeam($user);
37 | });
38 | });
39 | }
40 |
41 | /**
42 | * Create a personal team for the user.
43 | *
44 | * @param \App\Models\User $user
45 | * @return void
46 | */
47 | protected function createTeam(User $user)
48 | {
49 | $user->ownedTeams()->save(Team::forceCreate([
50 | 'user_id' => $user->id,
51 | 'name' => explode(' ', $user->name, 2)[0]."'s Team",
52 | 'personal_team' => true,
53 | ]));
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/PasswordValidationRules.php:
--------------------------------------------------------------------------------
1 | $this->passwordRules(),
24 | ])->validate();
25 |
26 | $user->forceFill([
27 | 'password' => Hash::make($input['password']),
28 | ])->save();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/UpdateUserPassword.php:
--------------------------------------------------------------------------------
1 | ['required', 'string'],
24 | 'password' => $this->passwordRules(),
25 | ])->after(function ($validator) use ($user, $input) {
26 | if (! Hash::check($input['current_password'], $user->password)) {
27 | $validator->errors()->add('current_password', __('The provided password does not match your current password.'));
28 | }
29 | })->validateWithBag('updatePassword');
30 |
31 | $user->forceFill([
32 | 'password' => Hash::make($input['password']),
33 | ])->save();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/Actions/Fortify/UpdateUserProfileInformation.php:
--------------------------------------------------------------------------------
1 | ['required', 'string', 'max:255'],
23 | 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
24 | 'photo' => ['nullable', 'image', 'max:1024'],
25 | ])->validateWithBag('updateProfileInformation');
26 |
27 | if (isset($input['photo'])) {
28 | $user->updateProfilePhoto($input['photo']);
29 | }
30 |
31 | if ($input['email'] !== $user->email &&
32 | $user instanceof MustVerifyEmail) {
33 | $this->updateVerifiedUser($user, $input);
34 | } else {
35 | $user->forceFill([
36 | 'name' => $input['name'],
37 | 'email' => $input['email'],
38 | ])->save();
39 | }
40 | }
41 |
42 | /**
43 | * Update the given verified user's profile information.
44 | *
45 | * @param mixed $user
46 | * @param array $input
47 | * @return void
48 | */
49 | protected function updateVerifiedUser($user, array $input)
50 | {
51 | $user->forceFill([
52 | 'name' => $input['name'],
53 | 'email' => $input['email'],
54 | 'email_verified_at' => null,
55 | ])->save();
56 |
57 | $user->sendEmailVerificationNotification();
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/Actions/Jetstream/AddTeamMember.php:
--------------------------------------------------------------------------------
1 | authorize('addTeamMember', $team);
26 |
27 | $this->validate($team, $email, $role);
28 |
29 | $team->users()->attach(
30 | $newTeamMember = Jetstream::findUserByEmailOrFail($email),
31 | ['role' => $role]
32 | );
33 |
34 | TeamMemberAdded::dispatch($team, $newTeamMember);
35 | }
36 |
37 | /**
38 | * Validate the add member operation.
39 | *
40 | * @param mixed $team
41 | * @param string $email
42 | * @param string|null $role
43 | * @return void
44 | */
45 | protected function validate($team, string $email, ?string $role)
46 | {
47 | Validator::make([
48 | 'email' => $email,
49 | 'role' => $role,
50 | ], $this->rules(), [
51 | 'email.exists' => __('We were unable to find a registered user with this email address.'),
52 | ])->after(
53 | $this->ensureUserIsNotAlreadyOnTeam($team, $email)
54 | )->validateWithBag('addTeamMember');
55 | }
56 |
57 | /**
58 | * Get the validation rules for adding a team member.
59 | *
60 | * @return array
61 | */
62 | protected function rules()
63 | {
64 | return array_filter([
65 | 'email' => ['required', 'email', 'exists:users'],
66 | 'role' => Jetstream::hasRoles()
67 | ? ['required', 'string', new Role]
68 | : null,
69 | ]);
70 | }
71 |
72 | /**
73 | * Ensure that the user is not already on the team.
74 | *
75 | * @param mixed $team
76 | * @param string $email
77 | * @return \Closure
78 | */
79 | protected function ensureUserIsNotAlreadyOnTeam($team, string $email)
80 | {
81 | return function ($validator) use ($team, $email) {
82 | $validator->errors()->addIf(
83 | $team->hasUserWithEmail($email),
84 | 'email',
85 | __('This user already belongs to the team.')
86 | );
87 | };
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/app/Actions/Jetstream/CreateTeam.php:
--------------------------------------------------------------------------------
1 | authorize('create', Jetstream::newTeamModel());
22 |
23 | Validator::make($input, [
24 | 'name' => ['required', 'string', 'max:255'],
25 | ])->validateWithBag('createTeam');
26 |
27 | return $user->ownedTeams()->create([
28 | 'name' => $input['name'],
29 | 'personal_team' => false,
30 | ]);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Actions/Jetstream/DeleteTeam.php:
--------------------------------------------------------------------------------
1 | purge();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Actions/Jetstream/DeleteUser.php:
--------------------------------------------------------------------------------
1 | deletesTeams = $deletesTeams;
27 | }
28 |
29 | /**
30 | * Delete the given user.
31 | *
32 | * @param mixed $user
33 | * @return void
34 | */
35 | public function delete($user)
36 | {
37 | DB::transaction(function () use ($user) {
38 | $this->deleteTeams($user);
39 |
40 | $user->delete();
41 | });
42 | }
43 |
44 | /**
45 | * Delete the teams and team associations attached to the user.
46 | *
47 | * @param mixed $user
48 | * @return void
49 | */
50 | protected function deleteTeams($user)
51 | {
52 | $user->teams()->detach();
53 |
54 | $user->ownedTeams->each(function ($team) {
55 | $this->deletesTeams->delete($team);
56 | });
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/Actions/Jetstream/UpdateTeamName.php:
--------------------------------------------------------------------------------
1 | authorize('update', $team);
22 |
23 | Validator::make($input, [
24 | 'name' => ['required', 'string', 'max:255'],
25 | ])->validateWithBag('updateTeamName');
26 |
27 | $team->forceFill([
28 | 'name' => $input['name'],
29 | ])->save();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/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 | [
33 | \App\Http\Middleware\EncryptCookies::class,
34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
35 | \Illuminate\Session\Middleware\StartSession::class,
36 | \Laravel\Jetstream\Http\Middleware\AuthenticateSession::class,
37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
38 | \App\Http\Middleware\VerifyCsrfToken::class,
39 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
40 | ],
41 |
42 | 'api' => [
43 | 'throttle:api',
44 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
45 | ],
46 | ];
47 |
48 | /**
49 | * The application's route middleware.
50 | *
51 | * These middleware may be assigned to groups or used individually.
52 | *
53 | * @var array
54 | */
55 | protected $routeMiddleware = [
56 | 'auth' => \App\Http\Middleware\Authenticate::class,
57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
58 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
59 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
60 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
61 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
62 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
63 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
64 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
65 | 'accessrole' => \App\Http\Middleware\EnsureUserRoleIsAllowedToAccess::class,
66 | ];
67 | }
68 |
--------------------------------------------------------------------------------
/app/Http/Livewire/ChatComponent.php:
--------------------------------------------------------------------------------
1 | user()->id, [1, 2])) { // Room for Billy and Adrian
24 | $this->roomId = 1;
25 | } else { // Room for Richard and John
26 | $this->roomId = 2;
27 | }
28 |
29 | // Sets the initial state of the chat popup during page load or reload
30 | $this->chatPopupVisibility = Cookie::get('chatPopupShow') == 'true' ? true : false;
31 | }
32 |
33 | /**
34 | * Shows the chat popup box
35 | *
36 | * @return void
37 | */
38 | public function showChatPopup()
39 | {
40 | Cookie::queue('chatPopupShow', 'true', 60);
41 | $this->chatPopupVisibility = true;
42 |
43 | // load chat history by reloading the page
44 | $this->dispatchBrowserEvent('reload-page');
45 | }
46 |
47 | /**
48 | * Hides the chat popup box
49 | *
50 | * @return void
51 | */
52 | public function closeChatPopup()
53 | {
54 | Cookie::queue('chatPopupShow', 'false', 60);
55 | $this->chatPopupVisibility = false;
56 | }
57 |
58 | /**
59 | * Sends the chat message
60 | *
61 | * @return void
62 | */
63 | public function sendMessage()
64 | {
65 | $userId = auth()->user()->id;
66 |
67 | // Save the message
68 | Message::create([
69 | 'room_id' => $this->roomId,
70 | 'user_id' => $userId,
71 | 'message' => $this->message,
72 | ]);
73 |
74 | // Remove the value of the message after saving
75 | $this->message = "";
76 |
77 | // Prompt the server that we sent a message
78 | $this->dispatchBrowserEvent('chat-send-message', [
79 | 'room_id' => $this->roomId,
80 | 'user_id' => $userId,
81 | ]);
82 | }
83 |
84 | public function render()
85 | {
86 | return view('livewire.chat-component');
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/Http/Livewire/Frontpage.php:
--------------------------------------------------------------------------------
1 | retrieveContent($urlslug);
23 | }
24 |
25 | /**
26 | * Retrieves the content of the page.
27 | *
28 | * @param mixed $urlslug
29 | * @return void
30 | */
31 | public function retrieveContent($urlslug)
32 | {
33 | // Get home page if slug is empty
34 | if (empty($urlslug)) {
35 | $data = Page::where('is_default_home', true)->first();
36 | } else {
37 |
38 | // Get the page according to the slug value
39 | $data = Page::where('slug', $urlslug)->first();
40 |
41 | // If we can't retrieve anything, let's get the default 404 not found page
42 | if (!$data) {
43 | $data = Page::where('is_default_not_found', true)->first();
44 | }
45 | }
46 |
47 | $this->title = $data->title;
48 | $this->content = $data->content;
49 | }
50 |
51 | /**
52 | * Gets all the sidebar links.
53 | *
54 | * @return void
55 | */
56 | private function sideBarLinks()
57 | {
58 | return DB::table('navigation_menus')
59 | ->where('type', '=', 'SidebarNav')
60 | ->orderBy('sequence', 'asc')
61 | ->orderBy('created_at', 'asc')
62 | ->get();
63 | }
64 |
65 | /**
66 | * Get the top navigation links.
67 | *
68 | * @return void
69 | */
70 | private function topNavLinks()
71 | {
72 | return DB::table('navigation_menus')
73 | ->where('type', '=', 'TopNav')
74 | ->orderBy('sequence', 'asc')
75 | ->orderBy('created_at', 'asc')
76 | ->get();
77 | }
78 |
79 | /**
80 | * The livewire render function.
81 | *
82 | * @return void
83 | */
84 | public function render()
85 | {
86 | return view('livewire.frontpage', [
87 | 'sideBarLinks' => $this->sideBarLinks(),
88 | 'topNavLinks' => $this->topNavLinks(),
89 | ])->layout('layouts.frontpage');
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/app/Http/Livewire/Users.php:
--------------------------------------------------------------------------------
1 | 'required',
32 | 'name' => 'required',
33 | ];
34 | }
35 |
36 | /**
37 | * Loads the model data
38 | * of this component.
39 | *
40 | * @return void
41 | */
42 | public function loadModel()
43 | {
44 | $data = User::find($this->modelId);
45 | $this->role = $data->role;
46 | $this->name = $data->name;
47 | }
48 |
49 | /**
50 | * The data for the model mapped
51 | * in this component.
52 | *
53 | * @return void
54 | */
55 | public function modelData()
56 | {
57 | return [
58 | 'role' => $this->role,
59 | 'name' => $this->name,
60 | ];
61 | }
62 |
63 | /**
64 | * The create function.
65 | *
66 | * @return void
67 | */
68 | public function create()
69 | {
70 | $this->validate();
71 | User::create($this->modelData());
72 | $this->modalFormVisible = false;
73 | $this->reset();
74 | }
75 |
76 | /**
77 | * The read function.
78 | *
79 | * @return void
80 | */
81 | public function read()
82 | {
83 | return User::paginate(5);
84 | }
85 |
86 | /**
87 | * The update function
88 | *
89 | * @return void
90 | */
91 | public function update()
92 | {
93 | $this->validate();
94 | User::find($this->modelId)->update($this->modelData());
95 | $this->modalFormVisible = false;
96 | }
97 |
98 | /**
99 | * The delete function.
100 | *
101 | * @return void
102 | */
103 | public function delete()
104 | {
105 | User::destroy($this->modelId);
106 | $this->modalConfirmDeleteVisible = false;
107 | $this->resetPage();
108 | }
109 |
110 | /**
111 | * Shows the create modal
112 | *
113 | * @return void
114 | */
115 | public function createShowModal()
116 | {
117 | $this->resetValidation();
118 | $this->reset();
119 | $this->modalFormVisible = true;
120 | }
121 |
122 | /**
123 | * Shows the form modal
124 | * in update mode.
125 | *
126 | * @param mixed $id
127 | * @return void
128 | */
129 | public function updateShowModal($id)
130 | {
131 | $this->resetValidation();
132 | $this->reset();
133 | $this->modalFormVisible = true;
134 | $this->modelId = $id;
135 | $this->loadModel();
136 | }
137 |
138 | /**
139 | * Shows the delete confirmation modal.
140 | *
141 | * @param mixed $id
142 | * @return void
143 | */
144 | public function deleteShowModal($id)
145 | {
146 | $this->modelId = $id;
147 | $this->modalConfirmDeleteVisible = true;
148 | }
149 |
150 | public function render()
151 | {
152 | return view('livewire.users', [
153 | 'data' => $this->read(),
154 | ]);
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | user()->role;
25 | $currentRouteName = Route::currentRouteName();
26 |
27 | if (UserPermission::isRoleHasRightToAccess($userRole, $currentRouteName)
28 | || in_array($currentRouteName, $this->defaultUserAccessRole()[$userRole])) {
29 | return $next($request);
30 | } else {
31 | abort(403, 'Unauthorized action.');
32 | }
33 | } catch (\Throwable $th) {
34 | abort(403, 'Unauthorized action.');
35 | }
36 | }
37 |
38 | /**
39 | * The default user access role.
40 | *
41 | * @return void
42 | */
43 | private function defaultUserAccessRole()
44 | {
45 | return [
46 | 'admin' => [
47 | 'user-permissions',
48 | ],
49 | ];
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/Http/Middleware/PreventRequestsDuringMaintenance.php:
--------------------------------------------------------------------------------
1 | check()) {
26 | return redirect(RouteServiceProvider::HOME);
27 | }
28 | }
29 |
30 | return $next($request);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | 'boolean',
19 | ];
20 |
21 | /**
22 | * The attributes that are mass assignable.
23 | *
24 | * @var array
25 | */
26 | protected $fillable = [
27 | 'name',
28 | 'personal_team',
29 | ];
30 |
31 | /**
32 | * The event map for the model.
33 | *
34 | * @var array
35 | */
36 | protected $dispatchesEvents = [
37 | 'created' => TeamCreated::class,
38 | 'updated' => TeamUpdated::class,
39 | 'deleted' => TeamDeleted::class,
40 | ];
41 | }
42 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 | 'datetime',
50 | ];
51 |
52 | /**
53 | * The accessors to append to the model's array form.
54 | *
55 | * @var array
56 | */
57 | protected $appends = [
58 | 'profile_photo_url',
59 | ];
60 |
61 | /**
62 | * The list of user roles
63 | *
64 | * @return void
65 | */
66 | public static function userRoleList()
67 | {
68 | return [
69 | 'admin' => 'Admin',
70 | 'user' => 'User',
71 | ];
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/Models/UserPermission.php:
--------------------------------------------------------------------------------
1 | where('route_name', $routeName)
41 | ->first();
42 |
43 | return $model ? true : false;
44 | } catch (\Throwable $th) {
45 | return false;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/Policies/TeamPolicy.php:
--------------------------------------------------------------------------------
1 | belongsToTeam($team);
34 | }
35 |
36 | /**
37 | * Determine whether the user can create models.
38 | *
39 | * @param \App\Models\User $user
40 | * @return mixed
41 | */
42 | public function create(User $user)
43 | {
44 | return true;
45 | }
46 |
47 | /**
48 | * Determine whether the user can update the model.
49 | *
50 | * @param \App\Models\User $user
51 | * @param \App\Models\Team $team
52 | * @return mixed
53 | */
54 | public function update(User $user, Team $team)
55 | {
56 | return $user->ownsTeam($team);
57 | }
58 |
59 | /**
60 | * Determine whether the user can add team members.
61 | *
62 | * @param \App\Models\User $user
63 | * @param \App\Models\Team $team
64 | * @return mixed
65 | */
66 | public function addTeamMember(User $user, Team $team)
67 | {
68 | return $user->ownsTeam($team);
69 | }
70 |
71 | /**
72 | * Determine whether the user can update team member permissions.
73 | *
74 | * @param \App\Models\User $user
75 | * @param \App\Models\Team $team
76 | * @return mixed
77 | */
78 | public function updateTeamMember(User $user, Team $team)
79 | {
80 | return $user->ownsTeam($team);
81 | }
82 |
83 | /**
84 | * Determine whether the user can remove team members.
85 | *
86 | * @param \App\Models\User $user
87 | * @param \App\Models\Team $team
88 | * @return mixed
89 | */
90 | public function removeTeamMember(User $user, Team $team)
91 | {
92 | return $user->ownsTeam($team);
93 | }
94 |
95 | /**
96 | * Determine whether the user can delete the model.
97 | *
98 | * @param \App\Models\User $user
99 | * @param \App\Models\Team $team
100 | * @return mixed
101 | */
102 | public function delete(User $user, Team $team)
103 | {
104 | return $user->ownsTeam($team);
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | TeamPolicy::class,
18 | ];
19 |
20 | /**
21 | * Register any authentication / authorization services.
22 | *
23 | * @return void
24 | */
25 | public function boot()
26 | {
27 | $this->registerPolicies();
28 |
29 | //
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/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/FortifyServiceProvider.php:
--------------------------------------------------------------------------------
1 | configurePermissions();
33 |
34 | Jetstream::createTeamsUsing(CreateTeam::class);
35 | Jetstream::updateTeamNamesUsing(UpdateTeamName::class);
36 | Jetstream::addTeamMembersUsing(AddTeamMember::class);
37 | Jetstream::deleteTeamsUsing(DeleteTeam::class);
38 | Jetstream::deleteUsersUsing(DeleteUser::class);
39 | }
40 |
41 | /**
42 | * Configure the roles and permissions that are available within the application.
43 | *
44 | * @return void
45 | */
46 | protected function configurePermissions()
47 | {
48 | Jetstream::defaultApiTokenPermissions(['read']);
49 |
50 | Jetstream::role('admin', __('Administrator'), [
51 | 'create',
52 | 'read',
53 | 'update',
54 | 'delete',
55 | ])->description(__('Administrator users can perform any action.'));
56 |
57 | Jetstream::role('editor', __('Editor'), [
58 | 'read',
59 | 'create',
60 | 'update',
61 | ])->description(__('Editor users have the ability to read, create, and update.'));
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | configureRateLimiting();
39 |
40 | $this->routes(function () {
41 | Route::prefix('api')
42 | ->middleware('api')
43 | ->namespace($this->namespace)
44 | ->group(base_path('routes/api.php'));
45 |
46 | Route::middleware('web')
47 | ->namespace($this->namespace)
48 | ->group(base_path('routes/web.php'));
49 | });
50 | }
51 |
52 | /**
53 | * Configure the rate limiters for the application.
54 | *
55 | * @return void
56 | */
57 | protected function configureRateLimiting()
58 | {
59 | RateLimiter::for('api', function (Request $request) {
60 | return Limit::perMinute(60);
61 | });
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/View/Components/AppLayout.php:
--------------------------------------------------------------------------------
1 | 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",
12 | "fideloper/proxy": "^4.2",
13 | "fruitcake/laravel-cors": "^2.0",
14 | "guzzlehttp/guzzle": "^7.0.1",
15 | "laravel/framework": "^8.0",
16 | "laravel/jetstream": "^1.4",
17 | "laravel/sanctum": "^2.6",
18 | "laravel/tinker": "^2.0",
19 | "livewire/livewire": "^2.0",
20 | "te7a-houdini/laravel-trix": "^2.0"
21 | },
22 | "require-dev": {
23 | "facade/ignition": "^2.3.6",
24 | "fzaninotto/faker": "^1.9.1",
25 | "mockery/mockery": "^1.3.1",
26 | "nunomaduro/collision": "^5.0",
27 | "phpunit/phpunit": "^9.3"
28 | },
29 | "config": {
30 | "optimize-autoloader": true,
31 | "preferred-install": "dist",
32 | "sort-packages": true
33 | },
34 | "extra": {
35 | "laravel": {
36 | "dont-discover": []
37 | }
38 | },
39 | "autoload": {
40 | "psr-4": {
41 | "App\\": "app/",
42 | "Database\\Factories\\": "database/factories/",
43 | "Database\\Seeders\\": "database/seeders/"
44 | }
45 | },
46 | "autoload-dev": {
47 | "psr-4": {
48 | "Tests\\": "tests/"
49 | }
50 | },
51 | "minimum-stability": "dev",
52 | "prefer-stable": true,
53 | "scripts": {
54 | "post-autoload-dump": [
55 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
56 | "@php artisan package:discover --ansi"
57 | ],
58 | "post-root-package-install": [
59 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
60 | ],
61 | "post-create-project-cmd": [
62 | "@php artisan key:generate --ansi"
63 | ]
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Cache Stores
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may define all of the cache "stores" for your application as
29 | | well as their drivers. You may even define multiple stores for the
30 | | same cache driver to group types of items stored in your caches.
31 | |
32 | */
33 |
34 | 'stores' => [
35 |
36 | 'apc' => [
37 | 'driver' => 'apc',
38 | ],
39 |
40 | 'array' => [
41 | 'driver' => 'array',
42 | 'serialize' => false,
43 | ],
44 |
45 | 'database' => [
46 | 'driver' => 'database',
47 | 'table' => 'cache',
48 | 'connection' => null,
49 | ],
50 |
51 | 'file' => [
52 | 'driver' => 'file',
53 | 'path' => storage_path('framework/cache/data'),
54 | ],
55 |
56 | 'memcached' => [
57 | 'driver' => 'memcached',
58 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
59 | 'sasl' => [
60 | env('MEMCACHED_USERNAME'),
61 | env('MEMCACHED_PASSWORD'),
62 | ],
63 | 'options' => [
64 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
65 | ],
66 | 'servers' => [
67 | [
68 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
69 | 'port' => env('MEMCACHED_PORT', 11211),
70 | 'weight' => 100,
71 | ],
72 | ],
73 | ],
74 |
75 | 'redis' => [
76 | 'driver' => 'redis',
77 | 'connection' => 'cache',
78 | ],
79 |
80 | 'dynamodb' => [
81 | 'driver' => 'dynamodb',
82 | 'key' => env('AWS_ACCESS_KEY_ID'),
83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
86 | 'endpoint' => env('DYNAMODB_ENDPOINT'),
87 | ],
88 |
89 | ],
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Cache Key Prefix
94 | |--------------------------------------------------------------------------
95 | |
96 | | When utilizing a RAM based store such as APC or Memcached, there might
97 | | be other applications utilizing the same cache. So, we'll specify a
98 | | value to get prefixed to all our keys so we can avoid collisions.
99 | |
100 | */
101 |
102 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
103 |
104 | ];
105 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*'],
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 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "sftp", "s3"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_ACCESS_KEY_ID'),
61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
62 | 'region' => env('AWS_DEFAULT_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | 'url' => env('AWS_URL'),
65 | 'endpoint' => env('AWS_ENDPOINT'),
66 | ],
67 |
68 | ],
69 |
70 | /*
71 | |--------------------------------------------------------------------------
72 | | Symbolic Links
73 | |--------------------------------------------------------------------------
74 | |
75 | | Here you may configure the symbolic links that will be created when the
76 | | `storage:link` Artisan command is executed. The array keys should be
77 | | the locations of the links and the values should be their targets.
78 | |
79 | */
80 |
81 | 'links' => [
82 | public_path('storage') => storage_path('app/public'),
83 | ],
84 |
85 | ];
86 |
--------------------------------------------------------------------------------
/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/jetstream.php:
--------------------------------------------------------------------------------
1 | 'livewire',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Features
23 | |--------------------------------------------------------------------------
24 | |
25 | | Some of Jetstream's features are optional. You may disable the features
26 | | by removing them from this array. You're free to only remove some of
27 | | these features or you can even remove all of these if you need to.
28 | |
29 | */
30 |
31 | 'features' => [
32 | // Features::profilePhotos(),
33 | // Features::api(),
34 | Features::teams(),
35 | ],
36 |
37 | ];
38 |
--------------------------------------------------------------------------------
/config/laravel-trix.php:
--------------------------------------------------------------------------------
1 | env('LARAVEL_TRIX_STORAGE_DISK', 'public'),
5 |
6 | 'store_attachment_action' => Te7aHoudini\LaravelTrix\Http\Controllers\TrixAttachmentController::class.'@store',
7 |
8 | 'destroy_attachment_action' => Te7aHoudini\LaravelTrix\Http\Controllers\TrixAttachmentController::class.'@destroy',
9 | ];
10 |
--------------------------------------------------------------------------------
/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'stack'),
21 |
22 | /*
23 | |--------------------------------------------------------------------------
24 | | Log Channels
25 | |--------------------------------------------------------------------------
26 | |
27 | | Here you may configure the log channels for your application. Out of
28 | | the box, Laravel uses the Monolog PHP logging library. This gives
29 | | you a variety of powerful log handlers / formatters to utilize.
30 | |
31 | | Available Drivers: "single", "daily", "slack", "syslog",
32 | | "errorlog", "monolog",
33 | | "custom", "stack"
34 | |
35 | */
36 |
37 | 'channels' => [
38 | 'stack' => [
39 | 'driver' => 'stack',
40 | 'channels' => ['single'],
41 | 'ignore_exceptions' => false,
42 | ],
43 |
44 | 'single' => [
45 | 'driver' => 'single',
46 | 'path' => storage_path('logs/laravel.log'),
47 | 'level' => env('LOG_LEVEL', 'debug'),
48 | ],
49 |
50 | 'daily' => [
51 | 'driver' => 'daily',
52 | 'path' => storage_path('logs/laravel.log'),
53 | 'level' => env('LOG_LEVEL', 'debug'),
54 | 'days' => 14,
55 | ],
56 |
57 | 'slack' => [
58 | 'driver' => 'slack',
59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
60 | 'username' => 'Laravel Log',
61 | 'emoji' => ':boom:',
62 | 'level' => env('LOG_LEVEL', 'critical'),
63 | ],
64 |
65 | 'papertrail' => [
66 | 'driver' => 'monolog',
67 | 'level' => env('LOG_LEVEL', 'debug'),
68 | 'handler' => SyslogUdpHandler::class,
69 | 'handler_with' => [
70 | 'host' => env('PAPERTRAIL_URL'),
71 | 'port' => env('PAPERTRAIL_PORT'),
72 | ],
73 | ],
74 |
75 | 'stderr' => [
76 | 'driver' => 'monolog',
77 | 'handler' => StreamHandler::class,
78 | 'formatter' => env('LOG_STDERR_FORMATTER'),
79 | 'with' => [
80 | 'stream' => 'php://stderr',
81 | ],
82 | ],
83 |
84 | 'syslog' => [
85 | 'driver' => 'syslog',
86 | 'level' => env('LOG_LEVEL', 'debug'),
87 | ],
88 |
89 | 'errorlog' => [
90 | 'driver' => 'errorlog',
91 | 'level' => env('LOG_LEVEL', 'debug'),
92 | ],
93 |
94 | 'null' => [
95 | 'driver' => 'monolog',
96 | 'handler' => NullHandler::class,
97 | ],
98 |
99 | 'emergency' => [
100 | 'path' => storage_path('logs/laravel.log'),
101 | ],
102 | ],
103 |
104 | ];
105 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_CONNECTION', 'sync'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Queue Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure the connection information for each server that
24 | | is used by your application. A default configuration has been added
25 | | for each back-end shipped with Laravel. You are free to add more.
26 | |
27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 90,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | 'block_for' => 0,
50 | ],
51 |
52 | 'sqs' => [
53 | 'driver' => 'sqs',
54 | 'key' => env('AWS_ACCESS_KEY_ID'),
55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'),
58 | 'suffix' => env('SQS_SUFFIX'),
59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
60 | ],
61 |
62 | 'redis' => [
63 | 'driver' => 'redis',
64 | 'connection' => 'default',
65 | 'queue' => env('REDIS_QUEUE', 'default'),
66 | 'retry_after' => 90,
67 | 'block_for' => null,
68 | ],
69 |
70 | ],
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | Failed Queue Jobs
75 | |--------------------------------------------------------------------------
76 | |
77 | | These options configure the behavior of failed queue job logging so you
78 | | can control which database and table are used to store the jobs that
79 | | have failed. You may change them to any database / table you wish.
80 | |
81 | */
82 |
83 | 'failed' => [
84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
85 | 'database' => env('DB_CONNECTION', 'mysql'),
86 | 'table' => 'failed_jobs',
87 | ],
88 |
89 | ];
90 |
--------------------------------------------------------------------------------
/config/sanctum.php:
--------------------------------------------------------------------------------
1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost,127.0.0.1,127.0.0.1:8000,::1')),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Expiration Minutes
21 | |--------------------------------------------------------------------------
22 | |
23 | | This value controls the number of minutes until an issued token will be
24 | | considered expired. If this value is null, personal access tokens do
25 | | not expire. This won't tweak the lifetime of first-party sessions.
26 | |
27 | */
28 |
29 | 'expiration' => null,
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Sanctum Middleware
34 | |--------------------------------------------------------------------------
35 | |
36 | | When authenticating your first-party SPA with Sanctum you may need to
37 | | customize some of the middleware Sanctum uses while processing the
38 | | request. You may change the middleware listed below as required.
39 | |
40 | */
41 |
42 | 'middleware' => [
43 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
44 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
45 | ],
46 |
47 | ];
48 |
--------------------------------------------------------------------------------
/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 | $this->faker->name,
27 | 'email' => $this->faker->unique()->safeEmail,
28 | 'email_verified_at' => now(),
29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
30 | 'remember_token' => Str::random(10),
31 | ];
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('name');
19 | $table->string('email')->unique();
20 | $table->timestamp('email_verified_at')->nullable();
21 | $table->string('password');
22 | $table->rememberToken();
23 | $table->foreignId('current_team_id')->nullable();
24 | $table->text('profile_photo_path')->nullable();
25 | $table->timestamps();
26 | });
27 | }
28 |
29 | /**
30 | * Reverse the migrations.
31 | *
32 | * @return void
33 | */
34 | public function down()
35 | {
36 | Schema::dropIfExists('users');
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
18 | $table->string('token');
19 | $table->timestamp('created_at')->nullable();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('password_resets');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php:
--------------------------------------------------------------------------------
1 | text('two_factor_secret')
18 | ->after('password')
19 | ->nullable();
20 |
21 | $table->text('two_factor_recovery_codes')
22 | ->after('two_factor_secret')
23 | ->nullable();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::table('users', function (Blueprint $table) {
35 | $table->dropColumn('two_factor_secret', 'two_factor_recovery_codes');
36 | });
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/2019_08_19_000000_create_failed_jobs_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('uuid')->unique();
19 | $table->text('connection');
20 | $table->text('queue');
21 | $table->longText('payload');
22 | $table->longText('exception');
23 | $table->timestamp('failed_at')->useCurrent();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('failed_jobs');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->morphs('tokenable');
19 | $table->string('name');
20 | $table->string('token', 64)->unique();
21 | $table->text('abilities')->nullable();
22 | $table->timestamp('last_used_at')->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('personal_access_tokens');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_21_100000_create_teams_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->foreignId('user_id')->index();
19 | $table->string('name');
20 | $table->boolean('personal_team');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::drop('teams');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_21_200000_create_team_user_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->foreignId('team_id');
19 | $table->foreignId('user_id');
20 | $table->string('role')->nullable();
21 | $table->timestamps();
22 |
23 | $table->unique(['team_id', 'user_id']);
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::drop('team_user');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2020_10_15_081242_create_sessions_table.php:
--------------------------------------------------------------------------------
1 | string('id')->primary();
18 | $table->foreignId('user_id')->nullable()->index();
19 | $table->string('ip_address', 45)->nullable();
20 | $table->text('user_agent')->nullable();
21 | $table->text('payload');
22 | $table->integer('last_activity')->index();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('sessions');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/migrations/2020_10_25_145528_create_pages_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('title')->nullable();
19 | $table->string('slug')->nullable();
20 | $table->longText('content')->nullable();
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('pages');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2020_10_25_150627_create_trix_rich_texts_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('id')->autoIncrement();
18 | $table->string('field');
19 | $table->morphs('model');
20 | $table->text('content')->nullable();
21 | $table->timestamps();
22 | });
23 |
24 | Schema::create('trix_attachments', function (Blueprint $table) {
25 | $table->unsignedBigInteger('id')->autoIncrement();
26 | $table->string('field');
27 | $table->unsignedInteger('attachable_id')->nullable();
28 | $table->string('attachable_type');
29 | $table->string('attachment');
30 | $table->string('disk');
31 | $table->boolean('is_pending')->default(1);
32 | $table->timestamps();
33 | });
34 | }
35 |
36 | /**
37 | * Reverse the migrations.
38 | *
39 | * @return void
40 | */
41 | public function down()
42 | {
43 | Schema::drop('trix_attachments');
44 | Schema::drop('trix_rich_texts');
45 | }
46 | }
--------------------------------------------------------------------------------
/database/migrations/2020_11_07_161745_add_set_default_pages_to_pages_table.php:
--------------------------------------------------------------------------------
1 | boolean('is_default_home')->nullable()->after('id');
18 | $table->boolean('is_default_not_found')->nullable()->after('is_default_home');
19 | });
20 | }
21 |
22 | /**
23 | * Reverse the migrations.
24 | *
25 | * @return void
26 | */
27 | public function down()
28 | {
29 | Schema::table('pages', function (Blueprint $table) {
30 | //
31 | });
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2020_12_23_113233_create_navigation_menus_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->integer('sequence');
19 | $table->enum('type', ['SidebarNav', 'TopNav']);
20 | $table->string('label');
21 | $table->string('slug');
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('navigation_menus');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/migrations/2021_01_04_051353_add_role_to_users_table.php:
--------------------------------------------------------------------------------
1 | string('role')->default('user')->after('id');
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::table('users', function (Blueprint $table) {
29 | //
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2021_01_18_040001_create_user_permissions_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('role')->nullable();
19 | $table->string('route_name')->nullable();
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | *
27 | * @return void
28 | */
29 | public function down()
30 | {
31 | Schema::dropIfExists('user_permissions');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2021_03_07_085741_create_messages_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->bigInteger('room_id');
19 | $table->bigInteger('user_id');
20 | $table->text('message');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('messages');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | create();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "npm run development -- --watch",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "@tailwindcss/ui": "^0.6.0",
14 | "axios": "^0.19",
15 | "browser-sync": "2.26.13",
16 | "browser-sync-webpack-plugin": "2.0.1",
17 | "cross-env": "^7.0",
18 | "laravel-mix": "^5.0.1",
19 | "lodash": "^4.17.19",
20 | "postcss-import": "^12.0.1",
21 | "resolve-url-loader": "^3.1.0",
22 | "tailwindcss": "^1.8.0",
23 | "vue-template-compiler": "2.6.12"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | {{ __('Navigation Menus') }}
5 |
6 |
4 | {{ __('Pages') }}
5 |
6 |
4 | {{ __('User Permissions') }}
5 |
6 |
4 | {{ __('Users') }}
5 |
6 |
4 | {{ __('API Tokens') }}
5 |
6 |
4 | {{ __('Dashboard') }}
5 |
6 |
merge(['class' => 'text-sm text-red-600']) }}>{{ $message }}
5 | @enderror 6 | -------------------------------------------------------------------------------- /resources/views/vendor/jetstream/components/input.blade.php: -------------------------------------------------------------------------------- 1 | @props(['disabled' => false]) 2 | 3 | merge(['class' => 'form-input rounded-md shadow-sm']) !!}> 4 | -------------------------------------------------------------------------------- /resources/views/vendor/jetstream/components/label.blade.php: -------------------------------------------------------------------------------- 1 | @props(['value']) 2 | 3 | 6 | -------------------------------------------------------------------------------- /resources/views/vendor/jetstream/components/modal.blade.php: -------------------------------------------------------------------------------- 1 | @props(['id', 'maxWidth']) 2 | 3 | @php 4 | $id = $id ?? md5($attributes->wire('model')); 5 | 6 | switch ($maxWidth ?? '2xl') { 7 | case 'sm': 8 | $maxWidth = 'sm:max-w-sm'; 9 | break; 10 | case 'md': 11 | $maxWidth = 'sm:max-w-md'; 12 | break; 13 | case 'lg': 14 | $maxWidth = 'sm:max-w-lg'; 15 | break; 16 | case 'xl': 17 | $maxWidth = 'sm:max-w-xl'; 18 | break; 19 | case '2xl': 20 | default: 21 | $maxWidth = 'sm:max-w-2xl'; 22 | break; 23 | } 24 | @endphp 25 | 26 | 72 | -------------------------------------------------------------------------------- /resources/views/vendor/jetstream/components/nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out' 6 | : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/vendor/jetstream/components/responsive-nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out' 6 | : 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/vendor/jetstream/components/secondary-button.blade.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /resources/views/vendor/jetstream/components/section-border.blade.php: -------------------------------------------------------------------------------- 1 |6 | {{ $description }} 7 |
8 |