├── public ├── favicon.ico ├── robots.txt ├── .htaccess └── index.php ├── resources ├── css │ └── app.css ├── js │ ├── layouts │ │ ├── LoginLayout.vue │ │ └── DashboardLayout.vue │ ├── types │ │ ├── ResponseData.ts │ │ ├── UserTypes.ts │ │ ├── Validation.ts │ │ └── AppTypes.ts │ ├── images │ │ └── logo.png │ ├── components │ │ ├── AppFooter.vue │ │ ├── dashboard │ │ │ ├── TodayReturns.vue │ │ │ ├── TodayPickups.vue │ │ │ ├── LatestReservations.vue │ │ │ └── Overview.vue │ │ └── AppTopbar.vue │ ├── http-common.ts │ ├── store │ │ ├── store.ts │ │ └── modules │ │ │ └── auth.ts │ ├── pages │ │ ├── template.vue │ │ ├── dashboards │ │ │ └── Admin.vue │ │ ├── Availibility.vue │ │ ├── Login.vue │ │ ├── CarType.vue │ │ ├── CarInventory.vue │ │ └── Reservations.vue │ ├── .babelrc │ ├── App.vue │ ├── bootstrap.js │ ├── services │ │ └── UserAuth.ts │ ├── router │ │ └── router.ts │ ├── app.ts │ └── dialogs │ │ └── CarTypeDialog.vue ├── scss │ ├── src │ │ ├── _variables.scss │ │ ├── _car-inventory.scss │ │ ├── _today-pickups.scss │ │ ├── _today-returns.scss │ │ ├── _latest-reservations.scss │ │ ├── _mixins.scss │ │ ├── _layout.scss │ │ ├── _main.scss │ │ ├── _media-query.scss │ │ ├── _car-types.scss │ │ ├── _reservations.scss │ │ └── _topbar.scss │ └── app.scss ├── shims-vue.d.ts ├── vuex.d.ts └── views │ └── app.blade.php ├── database ├── .gitignore ├── seeders │ └── DatabaseSeeder.php ├── migrations │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ └── 2019_12_14_000001_create_personal_access_tokens_table.php └── factories │ └── UserFactory.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── image.png ├── Dashboard.png ├── sidebar.png ├── spantiklab.png ├── CONTRIBUTING.md ├── .gitattributes ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── .styleci.yml ├── .gitignore ├── tsconfig.json ├── .editorconfig ├── app ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrustHosts.php │ │ ├── TrimStrings.php │ │ ├── Authenticate.php │ │ ├── TrustProxies.php │ │ └── RedirectIfAuthenticated.php │ ├── Controllers │ │ ├── Controller.php │ │ └── UserController.php │ └── Kernel.php ├── Actions │ └── Fortify │ │ ├── PasswordValidationRules.php │ │ ├── ResetUserPassword.php │ │ ├── CreateNewUser.php │ │ ├── UpdateUserPassword.php │ │ └── UpdateUserProfileInformation.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Console │ └── Kernel.php ├── Models │ └── User.php └── Exceptions │ └── Handler.php ├── vite.config.ts ├── routes ├── web.php ├── channels.php ├── console.php └── api.php ├── lang └── en │ ├── pagination.php │ ├── auth.php │ ├── passwords.php │ └── validation.php ├── config ├── cors.php ├── services.php ├── view.php ├── hashing.php ├── broadcasting.php ├── sanctum.php ├── filesystems.php ├── queue.php ├── cache.php ├── mail.php ├── auth.php ├── logging.php ├── database.php ├── session.php └── app.php ├── LICENSE.md ├── phpunit.xml ├── .env.example ├── package.json ├── artisan ├── composer.json ├── README.md ├── docker-compose.yml └── CODE_OF_CONDUCT.md /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /resources/js/layouts/LoginLayout.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/islamroshan/Laravel9-Vue3-TypeScript/HEAD/image.png -------------------------------------------------------------------------------- /Dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/islamroshan/Laravel9-Vue3-TypeScript/HEAD/Dashboard.png -------------------------------------------------------------------------------- /resources/js/types/ResponseData.ts: -------------------------------------------------------------------------------- 1 | export default interface ResponseData { 2 | data: any; 3 | } -------------------------------------------------------------------------------- /sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/islamroshan/Laravel9-Vue3-TypeScript/HEAD/sidebar.png -------------------------------------------------------------------------------- /spantiklab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/islamroshan/Laravel9-Vue3-TypeScript/HEAD/spantiklab.png -------------------------------------------------------------------------------- /resources/js/types/UserTypes.ts: -------------------------------------------------------------------------------- 1 | export default interface UserTypes { 2 | email: string; 3 | password: string; 4 | } -------------------------------------------------------------------------------- /resources/scss/src/_variables.scss: -------------------------------------------------------------------------------- 1 | /* General */ 2 | $fontSize:14px; 3 | $borderRadius:12px; 4 | $transitionDuration:.2s; -------------------------------------------------------------------------------- /resources/js/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/islamroshan/Laravel9-Vue3-TypeScript/HEAD/resources/js/images/logo.png -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Hello Contributors, 2 | you all are cordially invited to participate in this open source repository. 3 | Thanks 4 | -------------------------------------------------------------------------------- /resources/js/components/AppFooter.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/js/http-common.ts: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export default axios.create({ 4 | headers: { 5 | "Content-type": "application/json" 6 | } 7 | }); -------------------------------------------------------------------------------- /resources/scss/src/_car-inventory.scss: -------------------------------------------------------------------------------- 1 | .car-inventory-panel { 2 | .p-panel-header { 3 | background-color: var(--surface-100); 4 | padding: 2.1rem 1rem; 5 | } 6 | } -------------------------------------------------------------------------------- /resources/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { defineComponent } from 'vue' 3 | const component: ReturnType 4 | export default component 5 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | -------------------------------------------------------------------------------- /resources/scss/src/_today-pickups.scss: -------------------------------------------------------------------------------- 1 | .today-pickups { 2 | .p-panel-header { 3 | background-color: var(--bg-black-alpha-40); 4 | } 5 | .p-panel-content { 6 | padding: 0rem; 7 | } 8 | } -------------------------------------------------------------------------------- /resources/scss/src/_today-returns.scss: -------------------------------------------------------------------------------- 1 | .today-returns { 2 | .p-panel-header { 3 | background-color: var(--bg-black-alpha-40); 4 | } 5 | .p-panel-content { 6 | padding: 0rem; 7 | } 8 | } -------------------------------------------------------------------------------- /resources/js/store/store.ts: -------------------------------------------------------------------------------- 1 | import { createStore, useStore as baseUseStore } from 'vuex' 2 | import { authStore } from './modules/auth' 3 | 4 | export default createStore({ 5 | modules: { 6 | auth: authStore, 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /resources/scss/src/_latest-reservations.scss: -------------------------------------------------------------------------------- 1 | .latest-reservations { 2 | .p-panel-header { 3 | background-color: var(--bg-black-alpha-40); 4 | padding: 1rem 1rem !important; 5 | } 6 | .p-panel-content { 7 | padding: 0; 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /resources/vuex.d.ts: -------------------------------------------------------------------------------- 1 | import { Store } from 'vuex' 2 | 3 | declare module '@vue/runtime-core' { 4 | interface State { 5 | count: number 6 | } 7 | 8 | // provide typings for `this.$store` 9 | interface ComponentCustomProperties { 10 | $store: Store 11 | } 12 | } -------------------------------------------------------------------------------- /resources/js/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ["@babel/proposal-decorators", { "legacy": true }], 4 | ["@babel/proposal-class-properties", { "loose": true }], 5 | ["@babel/proposal-private-property-in-object", { "loose": true }], 6 | ["@babel/proposal-private-methods", { "loose": true }] 7 | ] 8 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "strict": true, 7 | "experimentalDecorators": true, 8 | "useDefineForClassFields": true, 9 | "allowSyntheticDefaultImports": true, 10 | "noImplicitAny": false, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.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 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /resources/scss/src/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin focused() { 2 | outline: 0 none; 3 | outline-offset: 0; 4 | transition: box-shadow .2s; 5 | box-shadow: var(--focus-ring); 6 | } 7 | 8 | @mixin focused-inset() { 9 | outline: 0 none; 10 | outline-offset: 0; 11 | transition: box-shadow .2s; 12 | box-shadow: inset var(--focus-ring); 13 | } -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /resources/js/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts() 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /resources/js/types/Validation.ts: -------------------------------------------------------------------------------- 1 | export default interface ValidationState { 2 | $dirty: false, // validations will only run when $dirty is true 3 | $touch: Function, // call to turn the $dirty state to true 4 | $reset: Function, // call to turn the $dirty state to false 5 | $errors: [], // contains all the current errors { $message, $params, $pending, $invalid } 6 | $error: false, // true if validations have not passed 7 | $invalid: false, // as above for compatibility reasons 8 | } -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{env('APP_NAME')}} 8 | 9 | 10 |
11 | @vite(['resources/scss/app.scss', 'resources/js/app.ts']) 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | where('any', '.*'); 19 | -------------------------------------------------------------------------------- /resources/scss/src/_layout.scss: -------------------------------------------------------------------------------- 1 | .layout-sidebar { 2 | width: 18rem; 3 | .p-sidebar-header { 4 | display: none; 5 | } 6 | .p-menu { 7 | width: 100%; 8 | } 9 | } 10 | 11 | .layout-main { 12 | display: flex; 13 | flex-direction: column; 14 | justify-content: space-between; 15 | min-height: 100vh; 16 | padding-top: 50px; 17 | flex: 1 1 0; 18 | .layout-footer { 19 | height: 20px; 20 | border-top: 1px solid var(--surface-border); 21 | background-color: var(--surface-card); 22 | padding: 2rem 3rem; 23 | } 24 | } -------------------------------------------------------------------------------- /resources/scss/app.scss: -------------------------------------------------------------------------------- 1 | @import 'primevue/resources/themes/md-light-indigo/theme.css'; 2 | @import "primevue/resources/primevue.min.css"; 3 | @import "primeicons/primeicons.css"; 4 | 5 | @import 'primeflex/primeflex.scss'; 6 | 7 | @import './src/variables'; 8 | @import './src/mixins'; 9 | 10 | @import './src/main'; 11 | @import './src/layout'; 12 | @import './src/topbar'; 13 | @import './src/reservations'; 14 | @import './src/car-inventory'; 15 | @import './src/latest-reservations'; 16 | @import './src/today-pickups'; 17 | @import './src/today-returns'; 18 | @import './src/car-types'; 19 | @import './src/media-query'; -------------------------------------------------------------------------------- /lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/scss/src/_main.scss: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | html { 6 | height: 100%; 7 | font-size: $fontSize; 8 | } 9 | 10 | // body::-webkit-scrollbar { 11 | // transition: $transitionDuration; 12 | // } 13 | body { 14 | font-family: var(--font-family); 15 | color: var(--text-color); 16 | background-color: var(--surface-ground); 17 | margin: 0; 18 | padding: 0; 19 | min-height: 100%; 20 | -webkit-font-smoothing: antialiased; 21 | -moz-osx-font-smoothing: grayscale; 22 | 23 | } 24 | 25 | a { 26 | text-decoration: none; 27 | color: var(--primary-color); 28 | } 29 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $policies = [ 16 | // 'App\Models\Model' => '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/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /resources/scss/src/_media-query.scss: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 960px) { 2 | .layout-sidebar{ 3 | width:15rem; 4 | } 5 | .layout-main { 6 | .layout-footer { 7 | padding: 2rem 2rem; 8 | } 9 | } 10 | } 11 | 12 | @media screen and (max-width: 960px) { 13 | ::v-deep(.customized-timeline) { 14 | .p-timeline-event:nth-child(even) { 15 | flex-direction: row !important; 16 | 17 | .p-timeline-event-content { 18 | text-align: left !important; 19 | } 20 | } 21 | 22 | .p-timeline-event-opposite { 23 | flex: 0; 24 | } 25 | 26 | .p-card { 27 | margin-top: 1rem; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /resources/js/types/AppTypes.ts: -------------------------------------------------------------------------------- 1 | export interface EventTypes { 2 | id: Number, 3 | name: String, 4 | date: Date, 5 | time: Date, 6 | org_name: String, 7 | org_email: String, 8 | org_phone: String, 9 | social_links: Object, 10 | description: String, 11 | url: String, 12 | image: String, 13 | video: String, 14 | users: Array, 15 | submitted: Boolean, 16 | created_at: Date, 17 | } 18 | 19 | export interface UserTypes { 20 | id: Number, 21 | firstname: String, 22 | lastname: String, 23 | username: String, 24 | dob: Date, 25 | address: String, 26 | city: String, 27 | country: String, 28 | postcode: String, 29 | gender: String, 30 | phone: String, 31 | image: String, 32 | assignEvent: Array, 33 | email: String, 34 | password: String, 35 | role: String, 36 | submitted: Boolean, 37 | created: Date 38 | } 39 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 19 | } 20 | 21 | /** 22 | * Register the commands for the application. 23 | * 24 | * @return void 25 | */ 26 | protected function commands() 27 | { 28 | $this->load(__DIR__.'/Commands'); 29 | 30 | require base_path('routes/console.php'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /app/Actions/Fortify/ResetUserPassword.php: -------------------------------------------------------------------------------- 1 | $this->passwordRules(), 24 | ])->validate(); 25 | 26 | $user->forceFill([ 27 | 'password' => Hash::make($input['password']), 28 | ])->save(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create([ 19 | 'name' => 'Admin', 20 | 'email' => 'admin@gmail.com', 21 | 'password' => Hash::make('123456789') 22 | ]); 23 | // \App\Models\User::factory(10)->create(); 24 | 25 | // \App\Models\User::factory()->create([ 26 | // 'name' => 'Test User', 27 | // 'email' => 'test@example.com', 28 | // ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | name('login'); 18 | Route::post('logout', [UserController::class, 'logout'])->middleware('auth:sanctum'); 19 | Route::post('checkauth', [UserController::class, 'checkAuth']); 20 | 21 | Route::middleware('auth:sanctum')->get('/user', function (Request $request) { 22 | return $request->user(); 23 | }); 24 | -------------------------------------------------------------------------------- /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->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'api/*', 20 | 'sanctum/csrf-cookie' 21 | ], 22 | 23 | 'allowed_methods' => ['*'], 24 | 25 | 'allowed_origins' => ['*'], 26 | 27 | 'allowed_origins_patterns' => [], 28 | 29 | 'allowed_headers' => ['*'], 30 | 31 | 'exposed_headers' => [], 32 | 33 | 'max_age' => 0, 34 | 35 | 'supports_credentials' => true, 36 | 37 | ]; 38 | 39 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | 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 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | protected $fillable = [ 21 | 'name', 22 | 'email', 23 | 'password', 24 | ]; 25 | 26 | /** 27 | * The attributes that should be hidden for serialization. 28 | * 29 | * @var array 30 | */ 31 | protected $hidden = [ 32 | 'password', 33 | 'remember_token', 34 | ]; 35 | 36 | /** 37 | * The attributes that should be cast. 38 | * 39 | * @var array 40 | */ 41 | protected $casts = [ 42 | 'email_verified_at' => 'datetime', 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | 'scheme' => 'https', 22 | ], 23 | 24 | 'postmark' => [ 25 | 'token' => env('POSTMARK_TOKEN'), 26 | ], 27 | 28 | 'ses' => [ 29 | 'key' => env('AWS_ACCESS_KEY_ID'), 30 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 31 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | > 16 | */ 17 | protected $listen = [ 18 | Registered::class => [ 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 | /** 34 | * Determine if events and listeners should be automatically discovered. 35 | * 36 | * @return bool 37 | */ 38 | public function shouldDiscoverEvents() 39 | { 40 | return false; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Muhammad Islam 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class UserFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition() 19 | { 20 | return [ 21 | 'name' => fake()->name(), 22 | 'email' => fake()->safeEmail(), 23 | 'email_verified_at' => now(), 24 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 25 | 'remember_token' => Str::random(10), 26 | ]; 27 | } 28 | 29 | /** 30 | * Indicate that the model's email address should be unverified. 31 | * 32 | * @return static 33 | */ 34 | public function unverified() 35 | { 36 | return $this->state(function (array $attributes) { 37 | return [ 38 | 'email_verified_at' => null, 39 | ]; 40 | }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /resources/scss/src/_car-types.scss: -------------------------------------------------------------------------------- 1 | .car-type-datatable { 2 | .car-image { 3 | width: 150px; 4 | } 5 | } 6 | 7 | .car-type-dialog { 8 | .p-dialog-header { 9 | text-transform: capitalize; 10 | border-bottom: 1px solid var(--surface-border); 11 | } 12 | .p-dialog-footer { 13 | border-top: 1px solid var(--surface-border); 14 | } 15 | .p-dialog-content { 16 | padding-top: 2rem; 17 | background: var(--surface-ground); 18 | } 19 | .p-tabview { 20 | .p-tabview-nav { 21 | border: none; 22 | li .p-tabview-nav-link { 23 | padding: 1.5rem; 24 | } 25 | } 26 | .p-tabview-panels { 27 | padding: 1.5rem; 28 | } 29 | } 30 | .p-panel { 31 | .p-panel-header { 32 | background-color: var(--surface-100); 33 | padding: 1.5rem 1rem; 34 | } 35 | .p-panel-content { 36 | padding: 0; 37 | } 38 | 39 | .p-datatable { 40 | .p-datatable-tbody > tr > td { 41 | border: none; 42 | border-width: 0; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Actions/Fortify/CreateNewUser.php: -------------------------------------------------------------------------------- 1 | ['required', 'string', 'max:255'], 25 | 'email' => [ 26 | 'required', 27 | 'string', 28 | 'email', 29 | 'max:255', 30 | Rule::unique(User::class), 31 | ], 32 | 'password' => $this->passwordRules(), 33 | ])->validate(); 34 | 35 | return User::create([ 36 | 'name' => $input['name'], 37 | 'email' => $input['email'], 38 | 'password' => Hash::make($input['password']), 39 | ]); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Actions/Fortify/UpdateUserPassword.php: -------------------------------------------------------------------------------- 1 | ['required', 'string'], 24 | 'password' => $this->passwordRules(), 25 | ])->after(function ($validator) use ($user, $input) { 26 | if (! isset($input['current_password']) || ! 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/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | , \Psr\Log\LogLevel::*> 14 | */ 15 | protected $levels = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * A list of the exception types that are not reported. 21 | * 22 | * @var array> 23 | */ 24 | protected $dontReport = [ 25 | // 26 | ]; 27 | 28 | /** 29 | * A list of the inputs that are never flashed to the session on validation exceptions. 30 | * 31 | * @var array 32 | */ 33 | protected $dontFlash = [ 34 | 'current_password', 35 | 'password', 36 | 'password_confirmation', 37 | ]; 38 | 39 | /** 40 | * Register the exception handling callbacks for the application. 41 | * 42 | * @return void 43 | */ 44 | public function register() 45 | { 46 | $this->reportable(function (Throwable $e) { 47 | // 48 | }); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /resources/js/pages/dashboards/Admin.vue: -------------------------------------------------------------------------------- 1 | 15 | 37 | 38 | -------------------------------------------------------------------------------- /.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_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=rent_car 15 | DB_USERNAME=root 16 | DB_PASSWORD= 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | FILESYSTEM_DISK=local 21 | QUEUE_CONNECTION=sync 22 | SESSION_DRIVER=file 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=smtp 32 | MAIL_HOST=mailhog 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS="hello@example.com" 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | AWS_ACCESS_KEY_ID= 41 | AWS_SECRET_ACCESS_KEY= 42 | AWS_DEFAULT_REGION=us-east-1 43 | AWS_BUCKET= 44 | AWS_USE_PATH_STYLE_ENDPOINT=false 45 | 46 | PUSHER_APP_ID= 47 | PUSHER_APP_KEY= 48 | PUSHER_APP_SECRET= 49 | PUSHER_HOST= 50 | PUSHER_PORT=443 51 | PUSHER_SCHEME=https 52 | PUSHER_APP_CLUSTER=mt1 53 | 54 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 55 | VITE_PUSHER_HOST="${PUSHER_HOST}" 56 | VITE_PUSHER_PORT="${PUSHER_PORT}" 57 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" 58 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 59 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | window._ = _; 3 | 4 | /** 5 | * We'll load the axios HTTP library which allows us to easily issue requests 6 | * to our Laravel back-end. This library automatically handles sending the 7 | * CSRF token as a header based on the value of the "XSRF" token cookie. 8 | */ 9 | 10 | import axios from 'axios'; 11 | window.axios = axios; 12 | 13 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 14 | 15 | /** 16 | * Echo exposes an expressive API for subscribing to channels and listening 17 | * for events that are broadcast by Laravel. Echo and event broadcasting 18 | * allows your team to easily build robust real-time web applications. 19 | */ 20 | 21 | // import Echo from 'laravel-echo'; 22 | 23 | // import Pusher from 'pusher-js'; 24 | // window.Pusher = Pusher; 25 | 26 | // window.Echo = new Echo({ 27 | // broadcaster: 'pusher', 28 | // key: import.meta.env.VITE_PUSHER_APP_KEY, 29 | // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_CLUSTER}.pusher.com`, 30 | // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, 31 | // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, 32 | // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', 33 | // enabledTransports: ['ws', 'wss'], 34 | // }); 35 | -------------------------------------------------------------------------------- /resources/js/services/UserAuth.ts: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | // import ProgressBar from "./ProgressBar"; 3 | // import store from "../store/store"; 4 | class UserAuth { 5 | baseUrl = 'api'; 6 | async checkAuth() { 7 | // ProgressBar.progressBar() 8 | await axios.get('/sanctum/csrf-cookie'); 9 | return axios.post(this.baseUrl + '/checkauth') 10 | } 11 | 12 | async create(data: any): Promise { 13 | await axios.get('/sanctum/csrf-cookie'); 14 | return axios.post("/register", data); 15 | } 16 | 17 | // async login(data: any): Promise { 18 | // console.log(data) 19 | // let formData = new FormData() 20 | // formData.append('email', data.email) 21 | // formData.append('password', data.password) 22 | 23 | // await axios.get("/sanctum/csrf-cookie"); 24 | // return axios.post("/login", formData); 25 | // } 26 | 27 | async login(data: any): Promise { 28 | // ProgressBar.progressBar() 29 | await axios.get('/sanctum/csrf-cookie'); 30 | return axios.post(this.baseUrl + "/login", data); 31 | } 32 | 33 | async logout(): Promise { 34 | // ProgressBar.progressBar() 35 | await axios.get('/sanctum/csrf-cookie'); 36 | return axios.post(this.baseUrl + "/logout"); 37 | } 38 | 39 | getSignature(data: any) { 40 | return axios.post(this.baseUrl + '/signature', data) 41 | } 42 | } 43 | 44 | export default new UserAuth(); -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 30 | 31 | $this->routes(function () { 32 | Route::middleware('api') 33 | ->prefix('api') 34 | ->group(base_path('routes/api.php')); 35 | 36 | Route::middleware('web') 37 | ->group(base_path('routes/web.php')); 38 | }); 39 | } 40 | 41 | /** 42 | * Configure the rate limiters for the application. 43 | * 44 | * @return void 45 | */ 46 | protected function configureRateLimiting() 47 | { 48 | RateLimiter::for('api', function (Request $request) { 49 | return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); 50 | }); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "vite", 5 | "build": "vite build" 6 | }, 7 | "devDependencies": { 8 | "@babel/plugin-proposal-class-properties": "^7.14.5", 9 | "@babel/plugin-proposal-decorators": "^7.15.4", 10 | "@vue/compiler-sfc": "^3.2.18", 11 | "axios": "^0.21.4", 12 | "crypto-js": "^4.1.1", 13 | "js-base64": "^3.7.2", 14 | "laravel-vite-plugin": "^0.2.1", 15 | "lodash": "^4.17.19", 16 | "postcss": "^8.1.14", 17 | "resolve-url-loader": "^4.0.0", 18 | "sass": "^1.32.11", 19 | "sass-loader": "^11.0.1", 20 | "ts-loader": "^9.2.5", 21 | "typescript": "^4.4.3", 22 | "vite": "^2.9.11", 23 | "vue-loader": "^16.8.1" 24 | }, 25 | "dependencies": { 26 | "@fullcalendar/core": "^5.11.2", 27 | "@fullcalendar/daygrid": "^5.11.2", 28 | "@fullcalendar/interaction": "^5.11.2", 29 | "@fullcalendar/timegrid": "^5.11.2", 30 | "@fullcalendar/vue3": "^5.11.2", 31 | "@vitejs/plugin-vue": "^2.3.3", 32 | "@vuelidate/core": "^2.0.0-alpha.27", 33 | "@vuelidate/validators": "^2.0.0-alpha.23", 34 | "moment": "^2.29.1", 35 | "primeflex": "^3.2.1", 36 | "primeicons": "^5.0.0", 37 | "primevue": "^3.15.0", 38 | "quill": "^1.3.6", 39 | "vue": "^3.2.18", 40 | "vue-class-component": "^8.0.0-rc.1", 41 | "vue-router": "^4.0.11", 42 | "vue3-youtube": "^0.1.9", 43 | "vuex": "^4.0.2" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /resources/js/components/dashboard/TodayReturns.vue: -------------------------------------------------------------------------------- 1 | 14 | 52 | -------------------------------------------------------------------------------- /resources/js/components/dashboard/TodayPickups.vue: -------------------------------------------------------------------------------- 1 | 14 | 52 | -------------------------------------------------------------------------------- /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' => 65536, 48 | 'threads' => 1, 49 | 'time' => 4, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /resources/js/store/modules/auth.ts: -------------------------------------------------------------------------------- 1 | export const authStore = { 2 | namespaced: true, 3 | state: () => ({ 4 | progressBar: false, 5 | isLoggedin: (localStorage.getItem('user') != null) ? JSON.parse(localStorage.getItem('user') as string).status : false, 6 | activeLayout: (localStorage.getItem('user') != null) ? JSON.parse(localStorage.getItem('user') as string).layout : 'Login', 7 | authUser: { 8 | id: 0, 9 | name: '', 10 | role: '' 11 | } 12 | }), 13 | mutations: { 14 | progressBar(state, status) { 15 | state.a.progressBar = status 16 | }, 17 | isLogin(state, data) { 18 | state.isLoggedin = data.success 19 | state.activeLayout = data.layout 20 | if (data.success && data.user != '') { 21 | let user = { 22 | id: data.user.id, 23 | name: data.user.name, 24 | layout: data.layout, 25 | status: data.success, 26 | role: 1 27 | } 28 | localStorage.setItem("user", JSON.stringify(user)) 29 | let userObj: any = localStorage.getItem('user'); 30 | user = JSON.parse(userObj) 31 | 32 | state.authUser.id = user.id 33 | state.authUser.name = user.name 34 | state.authUser.role = user.role 35 | } else { 36 | localStorage.clear() 37 | state.activeLayout = data.layout 38 | } 39 | }, 40 | user(state, data) { 41 | state.authUser.id = data.id 42 | state.authUser.name = data.name 43 | state.authUser.role = 1 44 | }, 45 | setLayout(state:any, layout:string) { 46 | state.activeLayout = layout 47 | } 48 | }, 49 | actions: { 50 | progressBarStart(context) { 51 | context.commit('a/progressBar', true) 52 | }, 53 | progressBarEnd(context) { 54 | context.commit('a/progressBar', false) 55 | } 56 | }, 57 | getters: { 58 | loginStatus(state) { 59 | return state.isLoggedin 60 | }, 61 | layoutName(state:any) { 62 | return state.activeLayout 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /resources/scss/src/_reservations.scss: -------------------------------------------------------------------------------- 1 | .table-header { 2 | display: flex; 3 | align-items: center; 4 | justify-content: space-between; 5 | 6 | @media screen and (max-width: 960px) { 7 | align-items: start; 8 | } 9 | } 10 | 11 | .p-badge-success { 12 | background-color: var(--green-300) !important; 13 | } 14 | 15 | .p-badge-info { 16 | background-color: var(--blue-300) !important; 17 | } 18 | 19 | .p-badge-danger { 20 | background-color: var(--pink-300) !important; 21 | } 22 | 23 | .p-badge-warning { 24 | background-color: var(--yellow-300) !important; 25 | color: var(--black-100); 26 | } 27 | 28 | .p-badge { 29 | background-color: var(--gray-300); 30 | color: var(--black-100); 31 | } 32 | 33 | .p-paginator { 34 | justify-content: center; 35 | } 36 | 37 | .reservation-dialog { 38 | .p-dialog-header { 39 | text-transform: capitalize; 40 | border-bottom: 1px solid var(--surface-border); 41 | } 42 | .p-dialog-footer { 43 | border-top: 1px solid var(--surface-border); 44 | } 45 | .p-dialog-content { 46 | padding-top: 2rem; 47 | background: var(--surface-ground); 48 | } 49 | .p-tabview { 50 | .p-tabview-nav { 51 | border: none; 52 | li .p-tabview-nav-link { 53 | padding: 1.5rem; 54 | } 55 | } 56 | .p-tabview-panels { 57 | padding: 1.5rem; 58 | } 59 | } 60 | .p-panel { 61 | .p-panel-header { 62 | background-color: var(--surface-100); 63 | padding: 1.5rem 1rem; 64 | } 65 | 66 | .p-panel-content { 67 | padding: 0; 68 | } 69 | 70 | .p-datatable { 71 | .p-datatable-tbody > tr > td { 72 | border: none; 73 | border-width: 0; 74 | } 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Request::capture() 53 | )->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /app/Actions/Fortify/UpdateUserProfileInformation.php: -------------------------------------------------------------------------------- 1 | ['required', 'string', 'max:255'], 23 | 24 | 'email' => [ 25 | 'required', 26 | 'string', 27 | 'email', 28 | 'max:255', 29 | Rule::unique('users')->ignore($user->id), 30 | ], 31 | ])->validateWithBag('updateProfileInformation'); 32 | 33 | if ($input['email'] !== $user->email && 34 | $user instanceof MustVerifyEmail) { 35 | $this->updateVerifiedUser($user, $input); 36 | } else { 37 | $user->forceFill([ 38 | 'name' => $input['name'], 39 | 'email' => $input['email'], 40 | ])->save(); 41 | } 42 | } 43 | 44 | /** 45 | * Update the given verified user's profile information. 46 | * 47 | * @param mixed $user 48 | * @param array $input 49 | * @return void 50 | */ 51 | protected function updateVerifiedUser($user, array $input) 52 | { 53 | $user->forceFill([ 54 | 'name' => $input['name'], 55 | 'email' => $input['email'], 56 | 'email_verified_at' => null, 57 | ])->save(); 58 | 59 | $user->sendEmailVerificationNotification(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": ["framework", "laravel"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^8.0.2", 9 | "guzzlehttp/guzzle": "^7.2", 10 | "laravel/framework": "^9.19", 11 | "laravel/sanctum": "^2.15", 12 | "laravel/tinker": "^2.7" 13 | }, 14 | "require-dev": { 15 | "fakerphp/faker": "^1.9.1", 16 | "laravel/sail": "^1.0.1", 17 | "mockery/mockery": "^1.4.4", 18 | "nunomaduro/collision": "^6.1", 19 | "phpunit/phpunit": "^9.5.10", 20 | "spatie/laravel-ignition": "^1.0" 21 | }, 22 | "autoload": { 23 | "psr-4": { 24 | "App\\": "app/", 25 | "Database\\Factories\\": "database/factories/", 26 | "Database\\Seeders\\": "database/seeders/" 27 | } 28 | }, 29 | "autoload-dev": { 30 | "psr-4": { 31 | "Tests\\": "tests/" 32 | } 33 | }, 34 | "scripts": { 35 | "post-autoload-dump": [ 36 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 37 | "@php artisan package:discover --ansi" 38 | ], 39 | "post-update-cmd": [ 40 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force" 41 | ], 42 | "post-root-package-install": [ 43 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 44 | ], 45 | "post-create-project-cmd": [ 46 | "@php artisan key:generate --ansi" 47 | ] 48 | }, 49 | "extra": { 50 | "laravel": { 51 | "dont-discover": [] 52 | } 53 | }, 54 | "config": { 55 | "optimize-autoloader": true, 56 | "preferred-install": "dist", 57 | "sort-packages": true 58 | }, 59 | "minimum-stability": "dev", 60 | "prefer-stable": true 61 | } 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Laravel 9 Development Starter Project.

2 | 3 | Descripton: in this repository you will get Laravel-9 starter scafold with configured settings for instance, if you are planning to start a new project with vue and laravel then only thing you need will be to fetch this repository and start building your app. 4 | 5 | This includes all latest pakages for development, Below are the list of pakages installed. 6 | 7 |
    8 |
  • Laravel 9
  • 9 |
  • Laravel Sanctum for authentication
  • 10 |
  • Vue 3
  • 11 |
  • Vue Class Component
  • 12 |
  • Vuex
  • 13 |
  • Vue Router
  • 14 |
  • TypeScript
  • 15 |
  • Prime Vue (Frontend framework for Vue js)
  • 16 |
  • Prime Flex (Gird System) and many other dependencies to start a new project
  • 17 |
18 | 19 | You can clone the project and make changes or distrubute it without any restrictions. 20 | Leave a Star/Fork if you appreciate my efforts. 21 | 22 | Follow these steps to run this app. 23 | 24 |
    25 |
  1. Make sure you have npm, node, php installed, I have used laravel sail for my development enviroment
  2. 26 |
  3. Clone the git repository
  4. 27 |
  5. cd into the directory
  6. 28 |
  7. Run, sail build or ./vendor/bin/sail build
  8. 29 |
  9. Run, Composer install
  10. 30 |
  11. Run, npm install
  12. 31 |
  13. Run, sail down and then sail up -d
  14. 32 |
  15. Run, sail artisan migrate
  16. 33 |
  17. Run, sail db:seed
  18. 34 |
  19. Run, sail npm run dev
  20. 35 |
  21. Open browser and type localhost
  22. 36 |
37 | 38 | Admin Dashboard Credentials 39 | Email: admin@gmail.com 40 | Pwd: 123456789 41 | 42 | Thanks 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # For more information: https://laravel.com/docs/sail 2 | version: '3' 3 | services: 4 | laravel.test: 5 | build: 6 | context: ./vendor/laravel/sail/runtimes/8.1 7 | dockerfile: Dockerfile 8 | args: 9 | WWWGROUP: '${WWWGROUP}' 10 | image: sail-8.1/app 11 | extra_hosts: 12 | - 'host.docker.internal:host-gateway' 13 | ports: 14 | - '${APP_PORT:-80}:80' 15 | - ${VITE_PORT:-5173}:${VITE_PORT:-5173} 16 | environment: 17 | WWWUSER: '${WWWUSER}' 18 | LARAVEL_SAIL: 1 19 | XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' 20 | XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' 21 | volumes: 22 | - '.:/var/www/html' 23 | networks: 24 | - sail 25 | depends_on: 26 | - mysql 27 | mysql: 28 | image: 'mysql/mysql-server:8.0' 29 | ports: 30 | - '${FORWARD_DB_PORT:-3306}:3306' 31 | environment: 32 | MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' 33 | MYSQL_ROOT_HOST: "%" 34 | MYSQL_DATABASE: '${DB_DATABASE}' 35 | MYSQL_USER: '${DB_USERNAME}' 36 | MYSQL_PASSWORD: '${DB_PASSWORD}' 37 | MYSQL_ALLOW_EMPTY_PASSWORD: 1 38 | volumes: 39 | - 'sail-mysql:/var/lib/mysql' 40 | networks: 41 | - sail 42 | healthcheck: 43 | test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"] 44 | retries: 3 45 | timeout: 5s 46 | phpmyadmin: 47 | image: phpmyadmin/phpmyadmin 48 | ports: 49 | - 8080:80 50 | networks: 51 | - sail 52 | environment: 53 | MYSQL_USERNAME: '${DB_USERNAME}' 54 | MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' 55 | PMA_HOST: mysql 56 | networks: 57 | sail: 58 | driver: bridge 59 | volumes: 60 | sail-mysql: 61 | driver: local 62 | -------------------------------------------------------------------------------- /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 | 'host' => env('PUSHER_HOST', 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', 40 | 'port' => env('PUSHER_PORT', 443), 41 | 'scheme' => env('PUSHER_SCHEME', 'https'), 42 | 'encrypted' => true, 43 | 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', 44 | ], 45 | 'client_options' => [ 46 | // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html 47 | ], 48 | ], 49 | 50 | 'ably' => [ 51 | 'driver' => 'ably', 52 | 'key' => env('ABLY_KEY'), 53 | ], 54 | 55 | 'redis' => [ 56 | 'driver' => 'redis', 57 | 'connection' => 'default', 58 | ], 59 | 60 | 'log' => [ 61 | 'driver' => 'log', 62 | ], 63 | 64 | 'null' => [ 65 | 'driver' => 'null', 66 | ], 67 | 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 19 | '%s%s', 20 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 21 | Sanctum::currentApplicationUrlWithPort() 22 | ))), 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Sanctum Guards 27 | |-------------------------------------------------------------------------- 28 | | 29 | | This array contains the authentication guards that will be checked when 30 | | Sanctum is trying to authenticate a request. If none of these guards 31 | | are able to authenticate the request, Sanctum will use the bearer 32 | | token that's present on an incoming request for authentication. 33 | | 34 | */ 35 | 36 | 'guard' => ['web'], 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Expiration Minutes 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This value controls the number of minutes until an issued token will be 44 | | considered expired. If this value is null, personal access tokens do 45 | | not expire. This won't tweak the lifetime of first-party sessions. 46 | | 47 | */ 48 | 49 | 'expiration' => null, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Sanctum Middleware 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When authenticating your first-party SPA with Sanctum you may need to 57 | | customize some of the middleware Sanctum uses while processing the 58 | | request. You may change the middleware listed below as required. 59 | | 60 | */ 61 | 62 | 'middleware' => [ 63 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 64 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /resources/js/pages/Availibility.vue: -------------------------------------------------------------------------------- 1 | 10 | 62 | -------------------------------------------------------------------------------- /resources/js/components/dashboard/LatestReservations.vue: -------------------------------------------------------------------------------- 1 | 24 | 55 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', '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 set up for each driver as an example of the required values. 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 | 'throw' => false, 37 | ], 38 | 39 | 'public' => [ 40 | 'driver' => 'local', 41 | 'root' => storage_path('app/public'), 42 | 'url' => env('APP_URL').'/storage', 43 | 'visibility' => 'public', 44 | 'throw' => false, 45 | ], 46 | 47 | 's3' => [ 48 | 'driver' => 's3', 49 | 'key' => env('AWS_ACCESS_KEY_ID'), 50 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 51 | 'region' => env('AWS_DEFAULT_REGION'), 52 | 'bucket' => env('AWS_BUCKET'), 53 | 'url' => env('AWS_URL'), 54 | 'endpoint' => env('AWS_ENDPOINT'), 55 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 56 | 'throw' => false, 57 | ], 58 | 59 | ], 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Symbolic Links 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Here you may configure the symbolic links that will be created when the 67 | | `storage:link` Artisan command is executed. The array keys should be 68 | | the locations of the links and the values should be their targets. 69 | | 70 | */ 71 | 72 | 'links' => [ 73 | public_path('storage') => storage_path('app/public'), 74 | ], 75 | 76 | ]; 77 | -------------------------------------------------------------------------------- /resources/js/router/router.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router'; 2 | 3 | const Login = () => import("../pages/Login.vue"); 4 | 5 | // Pages 6 | const Reservations = () => import("../pages/Reservations.vue"); 7 | const CarType = () => import("../pages/CarType.vue"); 8 | const CarInventory = () => import("../pages/CarInventory.vue"); 9 | const Availibility = () => import("../pages/Availibility.vue"); 10 | 11 | // Dashboard 12 | const Admin = () => import("../pages/dashboards/Admin.vue"); 13 | // const participant = () => import("../dashboard/participant.vue"); 14 | // const manager = () => import("../dashboard/manager.vue"); 15 | 16 | // // Services 17 | import UserAuth from "../services/UserAuth"; 18 | 19 | // // Types 20 | import ResponseData from "../types/ResponseData"; 21 | 22 | // // Store 23 | import store from "../store/store"; 24 | 25 | const routes = [ 26 | { path: '/', redirect: {path: '/login'} }, 27 | { path: '/login', component: Login , beforeEnter: [notAuthenticated] }, 28 | { path: '/admin', component: Admin , beforeEnter: [isAuthenticated] }, 29 | { path: '/reservations', component: Reservations, beforeEnter: [isAuthenticated] }, 30 | { path: '/car-type', component: CarType, beforeEnter: [isAuthenticated] }, 31 | { path: '/car-inventory', component: CarInventory, beforeEnter: [isAuthenticated] }, 32 | { path: '/availibility', component: Availibility, beforeEnter: [isAuthenticated] }, 33 | // { path: '/participant-dashboard', component: participant, beforeEnter: [isAuthenticated] }, 34 | // { path: '/manager-dashboard', component: manager, beforeEnter: [isAuthenticated] } 35 | ] 36 | 37 | function isAuthenticated(to: any, from: any, next: any) { 38 | UserAuth.checkAuth() 39 | .then((response: ResponseData) => { 40 | store.commit("auth/isLogin", response.data); 41 | // store.dispatch("login", response.data) 42 | 43 | if (response.data.success) 44 | next(); 45 | else 46 | next({ path: '/' }) 47 | }) 48 | .catch((e: Error) => { 49 | // store.commit('a/progressBar', false) 50 | return next({ path: '/' }) 51 | }); 52 | } 53 | 54 | function notAuthenticated(to: any, from: any, next: any) { 55 | UserAuth.checkAuth() 56 | .then((response: ResponseData) => { 57 | // store.dispatch("login", response.data) 58 | store.commit("auth/isLogin", response.data); 59 | if (response.data.success) 60 | next({ path: '/admin' }) 61 | else 62 | next(); 63 | }) 64 | .catch((e: Error) => { 65 | // store.commit('a/progressBar', false) 66 | return next(); 67 | }); 68 | } 69 | 70 | 71 | 72 | const router = createRouter({ 73 | history: createWebHistory(), 74 | routes 75 | }) 76 | 77 | export default router -------------------------------------------------------------------------------- /resources/js/components/AppTopbar.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | $request->email, 19 | 'password' => $request->password, 20 | ]; 21 | 22 | if (Auth::attempt($credentials)) { 23 | $id = Auth::user()->id; 24 | $user = User::find($id); 25 | $success = true; 26 | $layout = 'layout'; 27 | $message = 'User login successfully'; 28 | } else { 29 | $user = ''; 30 | $success = false; 31 | $layout = 'login'; 32 | $message = 'Unauthorised'; 33 | } 34 | 35 | // response 36 | $response = [ 37 | 'user' => $user, 38 | 'success' => $success, 39 | 'layout' => $layout, 40 | 'message' => $message, 41 | ]; 42 | return response()->json($response); 43 | } 44 | 45 | public function checkAuth() 46 | { 47 | if (Auth::check()) { 48 | $id = Auth::user()->id; 49 | $user = User::find($id); 50 | $success = true; 51 | $layout = 'layout'; 52 | $message = 'User login successfully'; 53 | } else { 54 | $user = ''; 55 | $success = false; 56 | $layout = 'login'; 57 | $message = 'Unauthorised'; 58 | } 59 | 60 | // response 61 | $response = [ 62 | 'user' => $user, 63 | 'success' => $success, 64 | 'layout' => $layout, 65 | 'message' => $message, 66 | ]; 67 | return response()->json($response); 68 | } 69 | 70 | /** 71 | * logout 72 | */ 73 | public function logout() 74 | { 75 | try { 76 | $user = ''; 77 | Session::flush(); 78 | $success = false; 79 | $layout = 'login'; 80 | $message = 'Successfully logged out'; 81 | } catch (\Illuminate\Database\QueryException $ex) { 82 | $user = ''; 83 | $success = false; 84 | $layout = 'login'; 85 | $message = $ex->getMessage(); 86 | } 87 | 88 | // response 89 | $response = [ 90 | 'user' => $user, 91 | 'success' => $success, 92 | 'layout' => $layout, 93 | 'message' => $message, 94 | ]; 95 | return response()->json($response); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | protected $middleware = [ 17 | // \App\Http\Middleware\TrustHosts::class, 18 | \App\Http\Middleware\TrustProxies::class, 19 | \Illuminate\Http\Middleware\HandleCors::class, 20 | \App\Http\Middleware\PreventRequestsDuringMaintenance::class, 21 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, 22 | \App\Http\Middleware\TrimStrings::class, 23 | \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, 24 | ]; 25 | 26 | /** 27 | * The application's route middleware groups. 28 | * 29 | * @var array> 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\View\Middleware\ShareErrorsFromSession::class, 37 | \App\Http\Middleware\VerifyCsrfToken::class, 38 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 39 | ], 40 | 'api' => [ 41 | \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 42 | 'throttle:api', 43 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 44 | ], 45 | ]; 46 | 47 | /** 48 | * The application's route middleware. 49 | * 50 | * These middleware may be assigned to groups or used individually. 51 | * 52 | * @var array 53 | */ 54 | protected $routeMiddleware = [ 55 | 'auth' => \App\Http\Middleware\Authenticate::class, 56 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 57 | 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::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 | ]; 66 | } 67 | -------------------------------------------------------------------------------- /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 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Failed Queue Jobs 79 | |-------------------------------------------------------------------------- 80 | | 81 | | These options configure the behavior of failed queue job logging so you 82 | | can control which database and table are used to store the jobs that 83 | | have failed. You may change them to any database / table you wish. 84 | | 85 | */ 86 | 87 | 'failed' => [ 88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 89 | 'database' => env('DB_CONNECTION', 'mysql'), 90 | 'table' => 'failed_jobs', 91 | ], 92 | 93 | ]; 94 | -------------------------------------------------------------------------------- /resources/js/components/dashboard/Overview.vue: -------------------------------------------------------------------------------- 1 | 59 | -------------------------------------------------------------------------------- /resources/js/app.ts: -------------------------------------------------------------------------------- 1 | import './bootstrap.js' 2 | 3 | import { createApp } from 'vue'; 4 | import App from "./App.vue"; 5 | import router from './router/router'; 6 | import store from './store/store'; 7 | 8 | import PrimeVue from "primevue/config"; 9 | import Menubar from 'primevue/menubar'; 10 | import MegaMenu from 'primevue/megamenu'; 11 | import Sidebar from 'primevue/sidebar'; 12 | import Button from 'primevue/button'; 13 | import Image from 'primevue/image'; 14 | import InputText from 'primevue/inputtext'; 15 | import Password from 'primevue/password'; 16 | import Card from 'primevue/card'; 17 | import Dropdown from 'primevue/dropdown'; 18 | import Textarea from 'primevue/textarea'; 19 | import Calendar from 'primevue/calendar'; 20 | import ProgressBar from 'primevue/progressbar'; 21 | import ToastService from 'primevue/toastservice'; 22 | import Toast from 'primevue/toast'; 23 | import FileUpload from 'primevue/fileupload'; 24 | import DataTable from 'primevue/datatable'; 25 | import Column from 'primevue/column'; 26 | import Dialog from 'primevue/dialog'; 27 | import ConfirmationService from 'primevue/confirmationservice'; 28 | import ConfirmDialog from 'primevue/confirmdialog'; 29 | import Toolbar from 'primevue/toolbar'; 30 | import ProgressSpinner from 'primevue/progressspinner'; 31 | import MultiSelect from 'primevue/multiselect'; 32 | import RadioButton from 'primevue/radiobutton'; 33 | import YouTube from 'vue3-youtube'; 34 | import Avatar from 'primevue/avatar'; 35 | import DataView from 'primevue/dataview'; 36 | import Editor from 'primevue/editor'; 37 | import InputNumber from 'primevue/inputnumber'; 38 | import Tooltip from 'primevue/tooltip'; 39 | import Menu from 'primevue/menu'; 40 | import Checkbox from 'primevue/checkbox'; 41 | import Panel from 'primevue/panel'; 42 | import Timeline from 'primevue/timeline'; 43 | import Badge from 'primevue/badge'; 44 | import TabView from 'primevue/tabview'; 45 | import TabPanel from 'primevue/tabpanel'; 46 | import InputSwitch from 'primevue/inputswitch'; 47 | 48 | // Full Calendar Component 49 | 50 | 51 | const app = createApp(App); 52 | app.use(PrimeVue, { ripple: true, inputStyle: 'outlined' }); 53 | app.use(router); 54 | app.use(store); 55 | app.use(ToastService); 56 | app.use(ConfirmationService); 57 | 58 | app.component('YouTube', YouTube) 59 | app.component('Menubar', Menubar); 60 | app.component('Sidebar', Sidebar); 61 | app.component('Button', Button); 62 | app.component('Image', Image); 63 | app.component('InputText', InputText); 64 | app.component('Password', Password); 65 | app.component('Dropdown', Dropdown); 66 | app.component('Textarea', Textarea); 67 | app.component('Card', Card); 68 | app.component('Calendar', Calendar); 69 | app.component('ProgressBar', ProgressBar); 70 | app.component('Toast', Toast); 71 | app.component('FileUpload', FileUpload); 72 | app.component('DataTable', DataTable); 73 | app.component('Column', Column); 74 | app.component('Dialog', Dialog); 75 | app.component('ConfirmDialog', ConfirmDialog); 76 | app.component('Toolbar', Toolbar); 77 | app.component('ProgressSpinner', ProgressSpinner); 78 | app.component('MultiSelect', MultiSelect); 79 | app.component('RadioButton', RadioButton); 80 | app.component('Avatar', Avatar); 81 | app.component('DataView', DataView); 82 | app.component('Editor', Editor); 83 | app.component('InputNumber', InputNumber); 84 | app.component('Menu', Menu); 85 | app.component('MegaMenu', MegaMenu) 86 | app.component('Checkbox', Checkbox) 87 | app.component('Panel', Panel) 88 | app.component('Timeline', Timeline) 89 | app.component('Badge', Badge) 90 | app.component('TabView', TabView) 91 | app.component('TabPanel', TabPanel) 92 | app.component('InputSwitch', InputSwitch) 93 | 94 | app.directive('tooltip', Tooltip) 95 | 96 | app.mount('#app'); -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 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 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | ], 56 | 57 | 'memcached' => [ 58 | 'driver' => 'memcached', 59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 60 | 'sasl' => [ 61 | env('MEMCACHED_USERNAME'), 62 | env('MEMCACHED_PASSWORD'), 63 | ], 64 | 'options' => [ 65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 66 | ], 67 | 'servers' => [ 68 | [ 69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 70 | 'port' => env('MEMCACHED_PORT', 11211), 71 | 'weight' => 100, 72 | ], 73 | ], 74 | ], 75 | 76 | 'redis' => [ 77 | 'driver' => 'redis', 78 | 'connection' => 'cache', 79 | 'lock_connection' => 'default', 80 | ], 81 | 82 | 'dynamodb' => [ 83 | 'driver' => 'dynamodb', 84 | 'key' => env('AWS_ACCESS_KEY_ID'), 85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 88 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 89 | ], 90 | 91 | 'octane' => [ 92 | 'driver' => 'octane', 93 | ], 94 | 95 | ], 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Cache Key Prefix 100 | |-------------------------------------------------------------------------- 101 | | 102 | | When utilizing the APC, database, memcached, Redis, or DynamoDB cache 103 | | stores there might be other applications using the same cache. For 104 | | that reason, you may prefix every cache key to avoid collisions. 105 | | 106 | */ 107 | 108 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /resources/js/pages/Login.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 110 | -------------------------------------------------------------------------------- /resources/scss/src/_topbar.scss: -------------------------------------------------------------------------------- 1 | .layout-topbar { 2 | position: fixed; 3 | height: 5rem; 4 | z-index: 997; 5 | left: 0; 6 | top: 0; 7 | width: 100%; 8 | padding: 0 2rem; 9 | background-color: var(--surface-card); 10 | transition: left $transitionDuration; 11 | display: flex; 12 | align-items: center; 13 | box-shadow: 0px 3px 5px rgba(0,0,0,.02), 0px 0px 2px rgba(0,0,0,.05), 0px 1px 4px rgba(0,0,0,.08); 14 | 15 | .layout-topbar-logo { 16 | display: flex; 17 | align-items: center; 18 | color: var(--surface-900); 19 | font-size: 1.5rem; 20 | font-weight: 500; 21 | width: 300px; 22 | border-radius: 12px; 23 | 24 | img { 25 | height: 2.5rem; 26 | margin-right: .5rem; 27 | } 28 | 29 | &:focus { 30 | @include focused(); 31 | } 32 | } 33 | 34 | .layout-topbar-button { 35 | display: inline-flex; 36 | justify-content: center; 37 | align-items: center; 38 | position: relative; 39 | color: var(--text-color-secondary); 40 | border-radius: 50%; 41 | width: 3rem; 42 | height: 3rem; 43 | cursor: pointer; 44 | transition: background-color $transitionDuration; 45 | 46 | &:hover { 47 | color: var(--text-color); 48 | background-color: var(--surface-hover); 49 | } 50 | 51 | &:focus { 52 | @include focused(); 53 | } 54 | 55 | i { 56 | font-size: 1.5rem; 57 | } 58 | 59 | span { 60 | font-size: 1rem; 61 | display: none; 62 | } 63 | } 64 | 65 | .layout-menu-button { 66 | margin-left: 2rem; 67 | } 68 | 69 | .layout-topbar-menu-button { 70 | display: none; 71 | 72 | i { 73 | font-size: 1.25rem; 74 | } 75 | } 76 | 77 | .layout-topbar-menu { 78 | margin: 0 0 0 auto; 79 | padding: 0; 80 | list-style: none; 81 | display: flex; 82 | 83 | .layout-topbar-button { 84 | margin-left: 1rem; 85 | } 86 | } 87 | } 88 | 89 | @media (max-width: 991px) { 90 | .layout-topbar { 91 | justify-content: space-between; 92 | 93 | .layout-topbar-logo { 94 | width: auto; 95 | order: 2; 96 | } 97 | 98 | .layout-menu-button { 99 | margin-left: 0; 100 | order: 1; 101 | } 102 | 103 | .layout-topbar-menu-button { 104 | display: inline-flex; 105 | margin-left: 0; 106 | order: 3; 107 | } 108 | 109 | .layout-topbar-menu { 110 | margin-left: 0; 111 | position: absolute; 112 | flex-direction: column; 113 | background-color: var(--surface-overlay); 114 | box-shadow: 0px 3px 5px rgba(0,0,0,.02), 0px 0px 2px rgba(0,0,0,.05), 0px 1px 4px rgba(0,0,0,.08); 115 | border-radius: 12px; 116 | padding: 1rem; 117 | right: 2rem; 118 | top: 5rem; 119 | min-width: 15rem; 120 | 121 | .layout-topbar-button { 122 | margin-left: 0; 123 | display: flex; 124 | width: 100%; 125 | height: auto; 126 | justify-content: flex-start; 127 | border-radius: 12px; 128 | padding: 1rem; 129 | 130 | i { 131 | font-size: 1rem; 132 | margin-right: .5rem; 133 | } 134 | 135 | span { 136 | font-weight: medium; 137 | display: block; 138 | } 139 | } 140 | } 141 | } 142 | } -------------------------------------------------------------------------------- /resources/js/layouts/DashboardLayout.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 160 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array", "failover" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'local_domain' => env('MAIL_EHLO_DOMAIN'), 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | 74 | 'failover' => [ 75 | 'transport' => 'failover', 76 | 'mailers' => [ 77 | 'smtp', 78 | 'log', 79 | ], 80 | ], 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Global "From" Address 86 | |-------------------------------------------------------------------------- 87 | | 88 | | You may wish for all e-mails sent by your application to be sent from 89 | | the same address. Here, you may specify a name and address that is 90 | | used globally for all e-mails that are sent by your application. 91 | | 92 | */ 93 | 94 | 'from' => [ 95 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 96 | 'name' => env('MAIL_FROM_NAME', 'Example'), 97 | ], 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Markdown Mail Settings 102 | |-------------------------------------------------------------------------- 103 | | 104 | | If you are using Markdown based email rendering, you may configure your 105 | | theme and component paths here, allowing you to customize the design 106 | | of the emails. Or, you may simply stick with the Laravel defaults! 107 | | 108 | */ 109 | 110 | 'markdown' => [ 111 | 'theme' => 'default', 112 | 113 | 'paths' => [ 114 | resource_path('views/vendor/mail'), 115 | ], 116 | ], 117 | 118 | ]; 119 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication drivers have a user provider. This defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | mechanisms used by this application to persist your user's data. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | sources which represent each model / table. These sources may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => App\Models\User::class, 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may specify multiple password reset configurations if you have more 80 | | than one user table or model in the application and you want to have 81 | | separate password reset settings based on the specific user types. 82 | | 83 | | The expire time is the number of minutes that each reset token will be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | */ 88 | 89 | 'passwords' => [ 90 | 'users' => [ 91 | 'provider' => 'users', 92 | 'table' => 'password_resets', 93 | 'expire' => 60, 94 | 'throttle' => 60, 95 | ], 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Password Confirmation Timeout 101 | |-------------------------------------------------------------------------- 102 | | 103 | | Here you may define the amount of seconds before a password confirmation 104 | | times out and the user is prompted to re-enter their password via the 105 | | confirmation screen. By default, the timeout lasts for three hours. 106 | | 107 | */ 108 | 109 | 'password_timeout' => 10800, 110 | 111 | ]; 112 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Deprecations Log Channel 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This option controls the log channel that should be used to log warnings 28 | | regarding deprecated PHP and library features. This allows you to get 29 | | your application ready for upcoming major versions of dependencies. 30 | | 31 | */ 32 | 33 | 'deprecations' => [ 34 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 35 | 'trace' => false, 36 | ], 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Log Channels 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Here you may configure the log channels for your application. Out of 44 | | the box, Laravel uses the Monolog PHP logging library. This gives 45 | | you a variety of powerful log handlers / formatters to utilize. 46 | | 47 | | Available Drivers: "single", "daily", "slack", "syslog", 48 | | "errorlog", "monolog", 49 | | "custom", "stack" 50 | | 51 | */ 52 | 53 | 'channels' => [ 54 | 'stack' => [ 55 | 'driver' => 'stack', 56 | 'channels' => ['single'], 57 | 'ignore_exceptions' => false, 58 | ], 59 | 60 | 'single' => [ 61 | 'driver' => 'single', 62 | 'path' => storage_path('logs/laravel.log'), 63 | 'level' => env('LOG_LEVEL', 'debug'), 64 | ], 65 | 66 | 'daily' => [ 67 | 'driver' => 'daily', 68 | 'path' => storage_path('logs/laravel.log'), 69 | 'level' => env('LOG_LEVEL', 'debug'), 70 | 'days' => 14, 71 | ], 72 | 73 | 'slack' => [ 74 | 'driver' => 'slack', 75 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 76 | 'username' => 'Laravel Log', 77 | 'emoji' => ':boom:', 78 | 'level' => env('LOG_LEVEL', 'critical'), 79 | ], 80 | 81 | 'papertrail' => [ 82 | 'driver' => 'monolog', 83 | 'level' => env('LOG_LEVEL', 'debug'), 84 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 85 | 'handler_with' => [ 86 | 'host' => env('PAPERTRAIL_URL'), 87 | 'port' => env('PAPERTRAIL_PORT'), 88 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 89 | ], 90 | ], 91 | 92 | 'stderr' => [ 93 | 'driver' => 'monolog', 94 | 'level' => env('LOG_LEVEL', 'debug'), 95 | 'handler' => StreamHandler::class, 96 | 'formatter' => env('LOG_STDERR_FORMATTER'), 97 | 'with' => [ 98 | 'stream' => 'php://stderr', 99 | ], 100 | ], 101 | 102 | 'syslog' => [ 103 | 'driver' => 'syslog', 104 | 'level' => env('LOG_LEVEL', 'debug'), 105 | ], 106 | 107 | 'errorlog' => [ 108 | 'driver' => 'errorlog', 109 | 'level' => env('LOG_LEVEL', 'debug'), 110 | ], 111 | 112 | 'null' => [ 113 | 'driver' => 'monolog', 114 | 'handler' => NullHandler::class, 115 | ], 116 | 117 | 'emergency' => [ 118 | 'path' => storage_path('logs/laravel.log'), 119 | ], 120 | ], 121 | 122 | ]; 123 | -------------------------------------------------------------------------------- /resources/js/pages/CarType.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 139 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | m.islam110699@gmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'search_path' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | // 'encrypt' => env('DB_ENCRYPT', 'yes'), 93 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), 94 | ], 95 | 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Migration Repository Table 101 | |-------------------------------------------------------------------------- 102 | | 103 | | This table keeps track of all the migrations that have already run for 104 | | your application. Using this information, we can determine which of 105 | | the migrations on disk haven't actually been run in the database. 106 | | 107 | */ 108 | 109 | 'migrations' => 'migrations', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Redis Databases 114 | |-------------------------------------------------------------------------- 115 | | 116 | | Redis is an open source, fast, and advanced key-value store that also 117 | | provides a richer body of commands than a typical key-value system 118 | | such as APC or Memcached. Laravel makes it easy to dig right in. 119 | | 120 | */ 121 | 122 | 'redis' => [ 123 | 124 | 'client' => env('REDIS_CLIENT', 'phpredis'), 125 | 126 | 'options' => [ 127 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 128 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 129 | ], 130 | 131 | 'default' => [ 132 | 'url' => env('REDIS_URL'), 133 | 'host' => env('REDIS_HOST', '127.0.0.1'), 134 | 'username' => env('REDIS_USERNAME'), 135 | 'password' => env('REDIS_PASSWORD'), 136 | 'port' => env('REDIS_PORT', '6379'), 137 | 'database' => env('REDIS_DB', '0'), 138 | ], 139 | 140 | 'cache' => [ 141 | 'url' => env('REDIS_URL'), 142 | 'host' => env('REDIS_HOST', '127.0.0.1'), 143 | 'username' => env('REDIS_USERNAME'), 144 | 'password' => env('REDIS_PASSWORD'), 145 | 'port' => env('REDIS_PORT', '6379'), 146 | 'database' => env('REDIS_CACHE_DB', '1'), 147 | ], 148 | 149 | ], 150 | 151 | ]; 152 | -------------------------------------------------------------------------------- /resources/js/pages/CarInventory.vue: -------------------------------------------------------------------------------- 1 | 88 | 151 | -------------------------------------------------------------------------------- /resources/js/pages/Reservations.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 191 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Session Lifetime 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may specify the number of minutes that you wish the session 29 | | to be allowed to remain idle before it expires. If you want them 30 | | to immediately expire on the browser closing, set that option. 31 | | 32 | */ 33 | 34 | 'lifetime' => env('SESSION_LIFETIME', 120), 35 | 36 | 'expire_on_close' => false, 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Session Encryption 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This option allows you to easily specify that all of your session data 44 | | should be encrypted before it is stored. All encryption will be run 45 | | automatically by Laravel and you can use the Session like normal. 46 | | 47 | */ 48 | 49 | 'encrypt' => false, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Session File Location 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When using the native session driver, we need a location where session 57 | | files may be stored. A default has been set for you but a different 58 | | location may be specified. This is only needed for file sessions. 59 | | 60 | */ 61 | 62 | 'files' => storage_path('framework/sessions'), 63 | 64 | /* 65 | |-------------------------------------------------------------------------- 66 | | Session Database Connection 67 | |-------------------------------------------------------------------------- 68 | | 69 | | When using the "database" or "redis" session drivers, you may specify a 70 | | connection that should be used to manage these sessions. This should 71 | | correspond to a connection in your database configuration options. 72 | | 73 | */ 74 | 75 | 'connection' => env('SESSION_CONNECTION'), 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Session Database Table 80 | |-------------------------------------------------------------------------- 81 | | 82 | | When using the "database" session driver, you may specify the table we 83 | | should use to manage the sessions. Of course, a sensible default is 84 | | provided for you; however, you are free to change this as needed. 85 | | 86 | */ 87 | 88 | 'table' => 'sessions', 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Session Cache Store 93 | |-------------------------------------------------------------------------- 94 | | 95 | | While using one of the framework's cache driven session backends you may 96 | | list a cache store that should be used for these sessions. This value 97 | | must match with one of the application's configured cache "stores". 98 | | 99 | | Affects: "apc", "dynamodb", "memcached", "redis" 100 | | 101 | */ 102 | 103 | 'store' => env('SESSION_STORE'), 104 | 105 | /* 106 | |-------------------------------------------------------------------------- 107 | | Session Sweeping Lottery 108 | |-------------------------------------------------------------------------- 109 | | 110 | | Some session drivers must manually sweep their storage location to get 111 | | rid of old sessions from storage. Here are the chances that it will 112 | | happen on a given request. By default, the odds are 2 out of 100. 113 | | 114 | */ 115 | 116 | 'lottery' => [2, 100], 117 | 118 | /* 119 | |-------------------------------------------------------------------------- 120 | | Session Cookie Name 121 | |-------------------------------------------------------------------------- 122 | | 123 | | Here you may change the name of the cookie used to identify a session 124 | | instance by ID. The name specified here will get used every time a 125 | | new session cookie is created by the framework for every driver. 126 | | 127 | */ 128 | 129 | 'cookie' => env( 130 | 'SESSION_COOKIE', 131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session' 132 | ), 133 | 134 | /* 135 | |-------------------------------------------------------------------------- 136 | | Session Cookie Path 137 | |-------------------------------------------------------------------------- 138 | | 139 | | The session cookie path determines the path for which the cookie will 140 | | be regarded as available. Typically, this will be the root path of 141 | | your application but you are free to change this when necessary. 142 | | 143 | */ 144 | 145 | 'path' => '/', 146 | 147 | /* 148 | |-------------------------------------------------------------------------- 149 | | Session Cookie Domain 150 | |-------------------------------------------------------------------------- 151 | | 152 | | Here you may change the domain of the cookie used to identify a session 153 | | in your application. This will determine which domains the cookie is 154 | | available to in your application. A sensible default has been set. 155 | | 156 | */ 157 | 158 | 'domain' => env('SESSION_DOMAIN'), 159 | 160 | /* 161 | |-------------------------------------------------------------------------- 162 | | HTTPS Only Cookies 163 | |-------------------------------------------------------------------------- 164 | | 165 | | By setting this option to true, session cookies will only be sent back 166 | | to the server if the browser has a HTTPS connection. This will keep 167 | | the cookie from being sent to you when it can't be done securely. 168 | | 169 | */ 170 | 171 | 'secure' => env('SESSION_SECURE_COOKIE'), 172 | 173 | /* 174 | |-------------------------------------------------------------------------- 175 | | HTTP Access Only 176 | |-------------------------------------------------------------------------- 177 | | 178 | | Setting this value to true will prevent JavaScript from accessing the 179 | | value of the cookie and the cookie will only be accessible through 180 | | the HTTP protocol. You are free to modify this option if needed. 181 | | 182 | */ 183 | 184 | 'http_only' => true, 185 | 186 | /* 187 | |-------------------------------------------------------------------------- 188 | | Same-Site Cookies 189 | |-------------------------------------------------------------------------- 190 | | 191 | | This option determines how your cookies behave when cross-site requests 192 | | take place, and can be used to mitigate CSRF attacks. By default, we 193 | | will set this value to "lax" since this is a secure default value. 194 | | 195 | | Supported: "lax", "strict", "none", null 196 | | 197 | */ 198 | 199 | 'same_site' => 'lax', 200 | 201 | ]; 202 | -------------------------------------------------------------------------------- /resources/js/dialogs/CarTypeDialog.vue: -------------------------------------------------------------------------------- 1 |