├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── ContactCompanyController.php │ │ │ ├── ContactContactController.php │ │ │ ├── HomeController.php │ │ │ ├── PermissionController.php │ │ │ ├── RoleController.php │ │ │ ├── TransactionController.php │ │ │ └── UserController.php │ │ ├── Auth │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ └── Controller.php │ ├── Kernel.php │ ├── Livewire │ │ ├── ContactCompany │ │ │ ├── Create.php │ │ │ ├── Edit.php │ │ │ └── Index.php │ │ ├── ContactContact │ │ │ ├── Create.php │ │ │ ├── Edit.php │ │ │ └── Index.php │ │ ├── Permission │ │ │ ├── Create.php │ │ │ ├── Edit.php │ │ │ └── Index.php │ │ ├── Role │ │ │ ├── Create.php │ │ │ ├── Edit.php │ │ │ └── Index.php │ │ ├── Transaction │ │ │ ├── Create.php │ │ │ ├── Edit.php │ │ │ └── Index.php │ │ ├── User │ │ │ ├── Create.php │ │ │ ├── Edit.php │ │ │ └── Index.php │ │ ├── WithConfirmation.php │ │ └── WithSorting.php │ └── Middleware │ │ ├── AuthGates.php │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── SetPreferredLocale.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Models │ ├── ContactCompany.php │ ├── ContactContact.php │ ├── Permission.php │ ├── Role.php │ ├── Transaction.php │ └── User.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Support │ ├── FilterQueryBuilder.php │ └── HasAdvancedFilter.php └── View │ └── Components │ ├── DatePicker.php │ ├── Dropzone.php │ └── SelectList.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── project.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2021_04_18_000001_create_permissions_table.php │ ├── 2021_04_18_000002_create_roles_table.php │ ├── 2021_04_18_000003_create_users_table.php │ ├── 2021_04_18_000004_create_contact_companies_table.php │ ├── 2021_04_18_000005_create_contact_contacts_table.php │ ├── 2021_04_18_000006_create_transactions_table.php │ ├── 2021_04_18_000007_create_permission_role_pivot_table.php │ ├── 2021_04_18_000008_create_role_user_pivot_table.php │ └── 2021_04_18_000009_add_relationship_fields_to_contact_contacts_table.php └── seeders │ ├── DatabaseSeeder.php │ ├── PermissionRoleTableSeeder.php │ ├── PermissionsTableSeeder.php │ ├── RoleUserTableSeeder.php │ ├── RolesTableSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── app.css ├── favicon.ico ├── index.php ├── js │ ├── app.js │ └── app.js.LICENSE.txt ├── mix-manifest.json ├── robots.txt ├── vendor │ └── livewire │ │ ├── livewire.js │ │ ├── livewire.js.map │ │ └── manifest.json └── web.config ├── resources ├── css │ ├── app.css │ ├── select.css │ └── theme.css ├── js │ ├── app.js │ └── bootstrap.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── cruds.php │ │ ├── global.php │ │ ├── pagination.php │ │ ├── panel.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── admin │ ├── contact-company │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── contact-contact │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── home.blade.php │ ├── permission │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── role │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── transaction │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ └── user │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── edit.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── components │ ├── date-picker.blade.php │ ├── dropzone.blade.php │ ├── footer.blade.php │ ├── select-list.blade.php │ ├── sidebar.blade.php │ └── table │ │ └── sort.blade.php │ ├── layouts │ ├── admin.blade.php │ └── app.blade.php │ ├── livewire │ ├── contact-company │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── contact-contact │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── permission │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── role │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── transaction │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ └── user │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── vendor │ └── livewire │ │ ├── simple-tailwind.blade.php │ │ └── tailwind.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_LEVEL=debug 9 | 10 | DB_CONNECTION=mysql 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | DB_DATABASE=laravel 14 | DB_USERNAME=root 15 | DB_PASSWORD= 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | QUEUE_CONNECTION=sync 20 | SESSION_DRIVER=file 21 | SESSION_LIFETIME=120 22 | 23 | MEMCACHED_HOST=127.0.0.1 24 | 25 | REDIS_HOST=127.0.0.1 26 | REDIS_PASSWORD=null 27 | REDIS_PORT=6379 28 | 29 | MAIL_MAILER=smtp 30 | MAIL_HOST=mailhog 31 | MAIL_PORT=1025 32 | MAIL_USERNAME=null 33 | MAIL_PASSWORD=null 34 | MAIL_ENCRYPTION=null 35 | MAIL_FROM_ADDRESS=null 36 | MAIL_FROM_NAME="${APP_NAME}" 37 | 38 | AWS_ACCESS_KEY_ID= 39 | AWS_SECRET_ACCESS_KEY= 40 | AWS_DEFAULT_REGION=us-east-1 41 | AWS_BUCKET= 42 | 43 | PUSHER_APP_ID= 44 | PUSHER_APP_KEY= 45 | PUSHER_APP_SECRET= 46 | PUSHER_APP_CLUSTER=mt1 47 | 48 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 49 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 50 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | docker-compose.override.yml 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel + Livewire + Tailwind: Example AdminPanel 2 | 3 | This is a demo-project, fully generated by [QuickAdminPanel.com](https://quickadminpanel.com) without writing a single line of code. 4 | 5 | In addition to roles/permissions manager, there are a few example CRUDs (Contact Management and Transactions) 6 | 7 | For the design, we're using [Notus JS theme](https://www.creative-tim.com/product/notus-js) from Creative Tim. 8 | 9 | - - - - - 10 | 11 | ## Screenshots 12 | 13 | ![Laravel AdminPanel Livewire Tailwind 01](https://blog.quickadminpanel.com/wp-content/uploads/2021/04/Screenshot-2021-04-20-at-10.52.09.png) 14 | 15 | - - - - - 16 | 17 | ![Laravel AdminPanel Livewire Tailwind 02](https://blog.quickadminpanel.com/wp-content/uploads/2021/04/Screenshot-2021-04-20-at-10.52.45.png) 18 | 19 | - - - - - 20 | 21 | ![Laravel AdminPanel Livewire Tailwind 03](https://blog.quickadminpanel.com/wp-content/uploads/2021/04/Screenshot-2021-04-20-at-10.53.05.png) 22 | 23 | - - - - - 24 | 25 | 26 | ## How to use 27 | 28 | - Clone the repository with __git clone__ 29 | - Copy __.env.example__ file to __.env__ and edit database credentials there 30 | - Run __composer install__ 31 | - Run __php artisan key:generate__ 32 | - Run __php artisan migrate --seed__ (it has some seeded data for your testing) 33 | - That's it: launch the main URL. 34 | - You can login to adminpanel by going go `/login` URL and login with credentials __admin@admin.com__ - __password__ 35 | 36 | 37 | ## License 38 | 39 | Basically, feel free to use and re-use any way you want. 40 | 41 | --- 42 | 43 | ## More from our LaravelDaily Team 44 | 45 | - Check out our adminpanel generator [QuickAdminPanel](https://quickadminpanel.com) 46 | - Subscribe to our [YouTube channel Laravel Daily](https://www.youtube.com/channel/UCTuplgOBi6tJIlesIboymGA) 47 | - Enroll in our [Laravel Online Courses](https://laraveldaily.teachable.com/) 48 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 37 | // 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/ContactCompanyController.php: -------------------------------------------------------------------------------- 1 | load('company'); 39 | 40 | return view('admin.contact-contact.show', compact('contactContact')); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/HomeController.php: -------------------------------------------------------------------------------- 1 | load('permissions'); 39 | 40 | return view('admin.role.show', compact('role')); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/TransactionController.php: -------------------------------------------------------------------------------- 1 | load('roles'); 39 | 40 | return view('admin.user.show', compact('user')); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @return \Illuminate\Contracts\Validation\Validator 46 | */ 47 | protected function validator(array $data) 48 | { 49 | return Validator::make($data, [ 50 | 'name' => ['required', 'string', 'max:255'], 51 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 52 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 53 | ]); 54 | } 55 | 56 | /** 57 | * Create a new user instance after a valid registration. 58 | * 59 | * @return \App\Models\User 60 | */ 61 | protected function create(array $data) 62 | { 63 | return User::create([ 64 | 'name' => $data['name'], 65 | 'email' => $data['email'], 66 | 'password' => Hash::make($data['password']), 67 | ]); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 37 | $this->middleware('signed')->only('verify'); 38 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | \App\Http\Middleware\AuthGates::class, 41 | \App\Http\Middleware\SetPreferredLocale::class, 42 | ], 43 | 44 | 'api' => [ 45 | \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 46 | // 'throttle:api', 47 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 48 | \App\Http\Middleware\AuthGates::class, 49 | ], 50 | ]; 51 | 52 | /** 53 | * The application's route middleware. 54 | * 55 | * These middleware may be assigned to groups or used individually. 56 | * 57 | * @var array 58 | */ 59 | protected $routeMiddleware = [ 60 | 'auth' => \App\Http\Middleware\Authenticate::class, 61 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 62 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 63 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 64 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 65 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 66 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 67 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 68 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 69 | ]; 70 | } 71 | -------------------------------------------------------------------------------- /app/Http/Livewire/ContactCompany/Create.php: -------------------------------------------------------------------------------- 1 | contactCompany = $contactCompany; 15 | } 16 | 17 | public function render() 18 | { 19 | return view('livewire.contact-company.create'); 20 | } 21 | 22 | public function submit() 23 | { 24 | $this->validate(); 25 | 26 | $this->contactCompany->save(); 27 | 28 | return redirect()->route('admin.contact-companies.index'); 29 | } 30 | 31 | protected function rules(): array 32 | { 33 | return [ 34 | 'contactCompany.company_name' => [ 35 | 'string', 36 | 'nullable', 37 | ], 38 | 'contactCompany.company_address' => [ 39 | 'string', 40 | 'nullable', 41 | ], 42 | 'contactCompany.company_website' => [ 43 | 'string', 44 | 'nullable', 45 | ], 46 | 'contactCompany.company_email' => [ 47 | 'string', 48 | 'nullable', 49 | ], 50 | ]; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Http/Livewire/ContactCompany/Edit.php: -------------------------------------------------------------------------------- 1 | contactCompany = $contactCompany; 15 | } 16 | 17 | public function render() 18 | { 19 | return view('livewire.contact-company.edit'); 20 | } 21 | 22 | public function submit() 23 | { 24 | $this->validate(); 25 | 26 | $this->contactCompany->save(); 27 | 28 | return redirect()->route('admin.contact-companies.index'); 29 | } 30 | 31 | protected function rules(): array 32 | { 33 | return [ 34 | 'contactCompany.company_name' => [ 35 | 'string', 36 | 'nullable', 37 | ], 38 | 'contactCompany.company_address' => [ 39 | 'string', 40 | 'nullable', 41 | ], 42 | 'contactCompany.company_website' => [ 43 | 'string', 44 | 'nullable', 45 | ], 46 | 'contactCompany.company_email' => [ 47 | 'string', 48 | 'nullable', 49 | ], 50 | ]; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Http/Livewire/ContactCompany/Index.php: -------------------------------------------------------------------------------- 1 | [ 31 | 'except' => '', 32 | ], 33 | 'sortBy' => [ 34 | 'except' => 'id', 35 | ], 36 | 'sortDirection' => [ 37 | 'except' => 'desc', 38 | ], 39 | ]; 40 | 41 | public function getSelectedCountProperty() 42 | { 43 | return count($this->selected); 44 | } 45 | 46 | public function updatingSearch() 47 | { 48 | $this->resetPage(); 49 | } 50 | 51 | public function updatingPerPage() 52 | { 53 | $this->resetPage(); 54 | } 55 | 56 | public function resetSelected() 57 | { 58 | $this->selected = []; 59 | } 60 | 61 | public function mount() 62 | { 63 | $this->sortBy = 'id'; 64 | $this->sortDirection = 'desc'; 65 | $this->perPage = 100; 66 | $this->paginationOptions = config('project.pagination.options'); 67 | $this->orderable = (new ContactCompany())->orderable; 68 | } 69 | 70 | public function render() 71 | { 72 | $query = ContactCompany::advancedFilter([ 73 | 's' => $this->search ?: null, 74 | 'order_column' => $this->sortBy, 75 | 'order_direction' => $this->sortDirection, 76 | ]); 77 | 78 | $contactCompanies = $query->paginate($this->perPage); 79 | 80 | return view('livewire.contact-company.index', compact('query', 'contactCompanies', 'contactCompanies')); 81 | } 82 | 83 | public function deleteSelected() 84 | { 85 | abort_if(Gate::denies('contact_company_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 86 | 87 | ContactCompany::whereIn('id', $this->selected)->delete(); 88 | 89 | $this->resetSelected(); 90 | } 91 | 92 | public function delete(ContactCompany $contactCompany) 93 | { 94 | abort_if(Gate::denies('contact_company_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 95 | 96 | $contactCompany->delete(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/Http/Livewire/ContactContact/Create.php: -------------------------------------------------------------------------------- 1 | contactContact = $contactContact; 18 | $this->initListsForFields(); 19 | } 20 | 21 | public function render() 22 | { 23 | return view('livewire.contact-contact.create'); 24 | } 25 | 26 | public function submit() 27 | { 28 | $this->validate(); 29 | 30 | $this->contactContact->save(); 31 | 32 | return redirect()->route('admin.contact-contacts.index'); 33 | } 34 | 35 | protected function rules(): array 36 | { 37 | return [ 38 | 'contactContact.company_id' => [ 39 | 'integer', 40 | 'exists:contact_companies,id', 41 | 'required', 42 | ], 43 | 'contactContact.contact_first_name' => [ 44 | 'string', 45 | 'nullable', 46 | ], 47 | 'contactContact.contact_last_name' => [ 48 | 'string', 49 | 'nullable', 50 | ], 51 | 'contactContact.contact_phone_1' => [ 52 | 'string', 53 | 'nullable', 54 | ], 55 | 'contactContact.contact_phone_2' => [ 56 | 'string', 57 | 'nullable', 58 | ], 59 | 'contactContact.contact_email' => [ 60 | 'string', 61 | 'nullable', 62 | ], 63 | 'contactContact.contact_skype' => [ 64 | 'string', 65 | 'nullable', 66 | ], 67 | 'contactContact.contact_address' => [ 68 | 'string', 69 | 'nullable', 70 | ], 71 | ]; 72 | } 73 | 74 | protected function initListsForFields(): void 75 | { 76 | $this->listsForFields['company'] = ContactCompany::pluck('company_name', 'id'); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/Http/Livewire/ContactContact/Edit.php: -------------------------------------------------------------------------------- 1 | contactContact = $contactContact; 18 | $this->initListsForFields(); 19 | } 20 | 21 | public function render() 22 | { 23 | return view('livewire.contact-contact.edit'); 24 | } 25 | 26 | public function submit() 27 | { 28 | $this->validate(); 29 | 30 | $this->contactContact->save(); 31 | 32 | return redirect()->route('admin.contact-contacts.index'); 33 | } 34 | 35 | protected function rules(): array 36 | { 37 | return [ 38 | 'contactContact.company_id' => [ 39 | 'integer', 40 | 'exists:contact_companies,id', 41 | 'required', 42 | ], 43 | 'contactContact.contact_first_name' => [ 44 | 'string', 45 | 'nullable', 46 | ], 47 | 'contactContact.contact_last_name' => [ 48 | 'string', 49 | 'nullable', 50 | ], 51 | 'contactContact.contact_phone_1' => [ 52 | 'string', 53 | 'nullable', 54 | ], 55 | 'contactContact.contact_phone_2' => [ 56 | 'string', 57 | 'nullable', 58 | ], 59 | 'contactContact.contact_email' => [ 60 | 'string', 61 | 'nullable', 62 | ], 63 | 'contactContact.contact_skype' => [ 64 | 'string', 65 | 'nullable', 66 | ], 67 | 'contactContact.contact_address' => [ 68 | 'string', 69 | 'nullable', 70 | ], 71 | ]; 72 | } 73 | 74 | protected function initListsForFields(): void 75 | { 76 | $this->listsForFields['company'] = ContactCompany::pluck('company_name', 'id'); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/Http/Livewire/ContactContact/Index.php: -------------------------------------------------------------------------------- 1 | [ 31 | 'except' => '', 32 | ], 33 | 'sortBy' => [ 34 | 'except' => 'id', 35 | ], 36 | 'sortDirection' => [ 37 | 'except' => 'desc', 38 | ], 39 | ]; 40 | 41 | public function getSelectedCountProperty() 42 | { 43 | return count($this->selected); 44 | } 45 | 46 | public function updatingSearch() 47 | { 48 | $this->resetPage(); 49 | } 50 | 51 | public function updatingPerPage() 52 | { 53 | $this->resetPage(); 54 | } 55 | 56 | public function resetSelected() 57 | { 58 | $this->selected = []; 59 | } 60 | 61 | public function mount() 62 | { 63 | $this->sortBy = 'id'; 64 | $this->sortDirection = 'desc'; 65 | $this->perPage = 100; 66 | $this->paginationOptions = config('project.pagination.options'); 67 | $this->orderable = (new ContactContact())->orderable; 68 | } 69 | 70 | public function render() 71 | { 72 | $query = ContactContact::with(['company'])->advancedFilter([ 73 | 's' => $this->search ?: null, 74 | 'order_column' => $this->sortBy, 75 | 'order_direction' => $this->sortDirection, 76 | ]); 77 | 78 | $contactContacts = $query->paginate($this->perPage); 79 | 80 | return view('livewire.contact-contact.index', compact('query', 'contactContacts', 'contactContacts')); 81 | } 82 | 83 | public function deleteSelected() 84 | { 85 | abort_if(Gate::denies('contact_contact_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 86 | 87 | ContactContact::whereIn('id', $this->selected)->delete(); 88 | 89 | $this->resetSelected(); 90 | } 91 | 92 | public function delete(ContactContact $contactContact) 93 | { 94 | abort_if(Gate::denies('contact_contact_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 95 | 96 | $contactContact->delete(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/Http/Livewire/Permission/Create.php: -------------------------------------------------------------------------------- 1 | permission = $permission; 15 | } 16 | 17 | public function render() 18 | { 19 | return view('livewire.permission.create'); 20 | } 21 | 22 | public function submit() 23 | { 24 | $this->validate(); 25 | 26 | $this->permission->save(); 27 | 28 | return redirect()->route('admin.permissions.index'); 29 | } 30 | 31 | protected function rules(): array 32 | { 33 | return [ 34 | 'permission.title' => [ 35 | 'string', 36 | 'required', 37 | ], 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Livewire/Permission/Edit.php: -------------------------------------------------------------------------------- 1 | permission = $permission; 15 | } 16 | 17 | public function render() 18 | { 19 | return view('livewire.permission.edit'); 20 | } 21 | 22 | public function submit() 23 | { 24 | $this->validate(); 25 | 26 | $this->permission->save(); 27 | 28 | return redirect()->route('admin.permissions.index'); 29 | } 30 | 31 | protected function rules(): array 32 | { 33 | return [ 34 | 'permission.title' => [ 35 | 'string', 36 | 'required', 37 | ], 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Livewire/Permission/Index.php: -------------------------------------------------------------------------------- 1 | [ 31 | 'except' => '', 32 | ], 33 | 'sortBy' => [ 34 | 'except' => 'id', 35 | ], 36 | 'sortDirection' => [ 37 | 'except' => 'desc', 38 | ], 39 | ]; 40 | 41 | public function getSelectedCountProperty() 42 | { 43 | return count($this->selected); 44 | } 45 | 46 | public function updatingSearch() 47 | { 48 | $this->resetPage(); 49 | } 50 | 51 | public function updatingPerPage() 52 | { 53 | $this->resetPage(); 54 | } 55 | 56 | public function resetSelected() 57 | { 58 | $this->selected = []; 59 | } 60 | 61 | public function mount() 62 | { 63 | $this->sortBy = 'id'; 64 | $this->sortDirection = 'desc'; 65 | $this->perPage = 100; 66 | $this->paginationOptions = config('project.pagination.options'); 67 | $this->orderable = (new Permission())->orderable; 68 | } 69 | 70 | public function render() 71 | { 72 | $query = Permission::advancedFilter([ 73 | 's' => $this->search ?: null, 74 | 'order_column' => $this->sortBy, 75 | 'order_direction' => $this->sortDirection, 76 | ]); 77 | 78 | $permissions = $query->paginate($this->perPage); 79 | 80 | return view('livewire.permission.index', compact('query', 'permissions', 'permissions')); 81 | } 82 | 83 | public function deleteSelected() 84 | { 85 | abort_if(Gate::denies('permission_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 86 | 87 | Permission::whereIn('id', $this->selected)->delete(); 88 | 89 | $this->resetSelected(); 90 | } 91 | 92 | public function delete(Permission $permission) 93 | { 94 | abort_if(Gate::denies('permission_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 95 | 96 | $permission->delete(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/Http/Livewire/Role/Create.php: -------------------------------------------------------------------------------- 1 | role = $role; 20 | $this->initListsForFields(); 21 | } 22 | 23 | public function render() 24 | { 25 | return view('livewire.role.create'); 26 | } 27 | 28 | public function submit() 29 | { 30 | $this->validate(); 31 | 32 | $this->role->save(); 33 | $this->role->permissions()->sync($this->permissions); 34 | 35 | return redirect()->route('admin.roles.index'); 36 | } 37 | 38 | protected function rules(): array 39 | { 40 | return [ 41 | 'role.title' => [ 42 | 'string', 43 | 'required', 44 | ], 45 | 'permissions' => [ 46 | 'required', 47 | 'array', 48 | ], 49 | 'permissions.*.id' => [ 50 | 'integer', 51 | 'exists:permissions,id', 52 | ], 53 | ]; 54 | } 55 | 56 | protected function initListsForFields(): void 57 | { 58 | $this->listsForFields['permissions'] = Permission::pluck('title', 'id'); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/Http/Livewire/Role/Edit.php: -------------------------------------------------------------------------------- 1 | role = $role; 20 | $this->permissions = $this->role->permissions()->pluck('id')->toArray(); 21 | $this->initListsForFields(); 22 | } 23 | 24 | public function render() 25 | { 26 | return view('livewire.role.edit'); 27 | } 28 | 29 | public function submit() 30 | { 31 | $this->validate(); 32 | 33 | $this->role->save(); 34 | $this->role->permissions()->sync($this->permissions); 35 | 36 | return redirect()->route('admin.roles.index'); 37 | } 38 | 39 | protected function rules(): array 40 | { 41 | return [ 42 | 'role.title' => [ 43 | 'string', 44 | 'required', 45 | ], 46 | 'permissions' => [ 47 | 'required', 48 | 'array', 49 | ], 50 | 'permissions.*.id' => [ 51 | 'integer', 52 | 'exists:permissions,id', 53 | ], 54 | ]; 55 | } 56 | 57 | protected function initListsForFields(): void 58 | { 59 | $this->listsForFields['permissions'] = Permission::pluck('title', 'id'); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Http/Livewire/Role/Index.php: -------------------------------------------------------------------------------- 1 | [ 31 | 'except' => '', 32 | ], 33 | 'sortBy' => [ 34 | 'except' => 'id', 35 | ], 36 | 'sortDirection' => [ 37 | 'except' => 'desc', 38 | ], 39 | ]; 40 | 41 | public function getSelectedCountProperty() 42 | { 43 | return count($this->selected); 44 | } 45 | 46 | public function updatingSearch() 47 | { 48 | $this->resetPage(); 49 | } 50 | 51 | public function updatingPerPage() 52 | { 53 | $this->resetPage(); 54 | } 55 | 56 | public function resetSelected() 57 | { 58 | $this->selected = []; 59 | } 60 | 61 | public function mount() 62 | { 63 | $this->sortBy = 'id'; 64 | $this->sortDirection = 'desc'; 65 | $this->perPage = 100; 66 | $this->paginationOptions = config('project.pagination.options'); 67 | $this->orderable = (new Role())->orderable; 68 | } 69 | 70 | public function render() 71 | { 72 | $query = Role::with(['permissions'])->advancedFilter([ 73 | 's' => $this->search ?: null, 74 | 'order_column' => $this->sortBy, 75 | 'order_direction' => $this->sortDirection, 76 | ]); 77 | 78 | $roles = $query->paginate($this->perPage); 79 | 80 | return view('livewire.role.index', compact('query', 'roles', 'roles')); 81 | } 82 | 83 | public function deleteSelected() 84 | { 85 | abort_if(Gate::denies('role_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 86 | 87 | Role::whereIn('id', $this->selected)->delete(); 88 | 89 | $this->resetSelected(); 90 | } 91 | 92 | public function delete(Role $role) 93 | { 94 | abort_if(Gate::denies('role_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 95 | 96 | $role->delete(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/Http/Livewire/Transaction/Create.php: -------------------------------------------------------------------------------- 1 | transaction = $transaction; 15 | } 16 | 17 | public function render() 18 | { 19 | return view('livewire.transaction.create'); 20 | } 21 | 22 | public function submit() 23 | { 24 | $this->validate(); 25 | 26 | $this->transaction->save(); 27 | 28 | return redirect()->route('admin.transactions.index'); 29 | } 30 | 31 | protected function rules(): array 32 | { 33 | return [ 34 | 'transaction.amount' => [ 35 | 'numeric', 36 | 'nullable', 37 | ], 38 | 'transaction.transaction_date' => [ 39 | 'nullable', 40 | 'date_format:' . config('project.date_format'), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Livewire/Transaction/Edit.php: -------------------------------------------------------------------------------- 1 | transaction = $transaction; 15 | } 16 | 17 | public function render() 18 | { 19 | return view('livewire.transaction.edit'); 20 | } 21 | 22 | public function submit() 23 | { 24 | $this->validate(); 25 | 26 | $this->transaction->save(); 27 | 28 | return redirect()->route('admin.transactions.index'); 29 | } 30 | 31 | protected function rules(): array 32 | { 33 | return [ 34 | 'transaction.amount' => [ 35 | 'numeric', 36 | 'nullable', 37 | ], 38 | 'transaction.transaction_date' => [ 39 | 'nullable', 40 | 'date_format:' . config('project.date_format'), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Livewire/Transaction/Index.php: -------------------------------------------------------------------------------- 1 | [ 31 | 'except' => '', 32 | ], 33 | 'sortBy' => [ 34 | 'except' => 'id', 35 | ], 36 | 'sortDirection' => [ 37 | 'except' => 'desc', 38 | ], 39 | ]; 40 | 41 | public function getSelectedCountProperty() 42 | { 43 | return count($this->selected); 44 | } 45 | 46 | public function updatingSearch() 47 | { 48 | $this->resetPage(); 49 | } 50 | 51 | public function updatingPerPage() 52 | { 53 | $this->resetPage(); 54 | } 55 | 56 | public function resetSelected() 57 | { 58 | $this->selected = []; 59 | } 60 | 61 | public function mount() 62 | { 63 | $this->sortBy = 'id'; 64 | $this->sortDirection = 'desc'; 65 | $this->perPage = 100; 66 | $this->paginationOptions = config('project.pagination.options'); 67 | $this->orderable = (new Transaction())->orderable; 68 | } 69 | 70 | public function render() 71 | { 72 | $query = Transaction::advancedFilter([ 73 | 's' => $this->search ?: null, 74 | 'order_column' => $this->sortBy, 75 | 'order_direction' => $this->sortDirection, 76 | ]); 77 | 78 | $transactions = $query->paginate($this->perPage); 79 | 80 | return view('livewire.transaction.index', compact('query', 'transactions', 'transactions')); 81 | } 82 | 83 | public function deleteSelected() 84 | { 85 | abort_if(Gate::denies('transaction_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 86 | 87 | Transaction::whereIn('id', $this->selected)->delete(); 88 | 89 | $this->resetSelected(); 90 | } 91 | 92 | public function delete(Transaction $transaction) 93 | { 94 | abort_if(Gate::denies('transaction_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 95 | 96 | $transaction->delete(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/Http/Livewire/User/Create.php: -------------------------------------------------------------------------------- 1 | user = $user; 22 | $this->initListsForFields(); 23 | } 24 | 25 | public function render() 26 | { 27 | return view('livewire.user.create'); 28 | } 29 | 30 | public function submit() 31 | { 32 | $this->validate(); 33 | $this->user->password = $this->password; 34 | $this->user->save(); 35 | $this->user->roles()->sync($this->roles); 36 | 37 | return redirect()->route('admin.users.index'); 38 | } 39 | 40 | protected function rules(): array 41 | { 42 | return [ 43 | 'user.name' => [ 44 | 'string', 45 | 'required', 46 | ], 47 | 'user.email' => [ 48 | 'email:rfc', 49 | 'required', 50 | 'unique:users,email', 51 | ], 52 | 'password' => [ 53 | 'string', 54 | 'required', 55 | ], 56 | 'roles' => [ 57 | 'required', 58 | 'array', 59 | ], 60 | 'roles.*.id' => [ 61 | 'integer', 62 | 'exists:roles,id', 63 | ], 64 | ]; 65 | } 66 | 67 | protected function initListsForFields(): void 68 | { 69 | $this->listsForFields['roles'] = Role::pluck('title', 'id'); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Livewire/User/Edit.php: -------------------------------------------------------------------------------- 1 | user = $user; 22 | $this->roles = $this->user->roles()->pluck('id')->toArray(); 23 | $this->initListsForFields(); 24 | } 25 | 26 | public function render() 27 | { 28 | return view('livewire.user.edit'); 29 | } 30 | 31 | public function submit() 32 | { 33 | $this->validate(); 34 | $this->user->password = $this->password; 35 | $this->user->save(); 36 | $this->user->roles()->sync($this->roles); 37 | 38 | return redirect()->route('admin.users.index'); 39 | } 40 | 41 | protected function rules(): array 42 | { 43 | return [ 44 | 'user.name' => [ 45 | 'string', 46 | 'required', 47 | ], 48 | 'user.email' => [ 49 | 'email:rfc', 50 | 'required', 51 | 'unique:users,email,' . $this->user->id, 52 | ], 53 | 'password' => [ 54 | 'string', 55 | ], 56 | 'roles' => [ 57 | 'required', 58 | 'array', 59 | ], 60 | 'roles.*.id' => [ 61 | 'integer', 62 | 'exists:roles,id', 63 | ], 64 | ]; 65 | } 66 | 67 | protected function initListsForFields(): void 68 | { 69 | $this->listsForFields['roles'] = Role::pluck('title', 'id'); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Livewire/User/Index.php: -------------------------------------------------------------------------------- 1 | [ 31 | 'except' => '', 32 | ], 33 | 'sortBy' => [ 34 | 'except' => 'id', 35 | ], 36 | 'sortDirection' => [ 37 | 'except' => 'desc', 38 | ], 39 | ]; 40 | 41 | public function getSelectedCountProperty() 42 | { 43 | return count($this->selected); 44 | } 45 | 46 | public function updatingSearch() 47 | { 48 | $this->resetPage(); 49 | } 50 | 51 | public function updatingPerPage() 52 | { 53 | $this->resetPage(); 54 | } 55 | 56 | public function resetSelected() 57 | { 58 | $this->selected = []; 59 | } 60 | 61 | public function mount() 62 | { 63 | $this->sortBy = 'id'; 64 | $this->sortDirection = 'desc'; 65 | $this->perPage = 100; 66 | $this->paginationOptions = config('project.pagination.options'); 67 | $this->orderable = (new User())->orderable; 68 | } 69 | 70 | public function render() 71 | { 72 | $query = User::with(['roles'])->advancedFilter([ 73 | 's' => $this->search ?: null, 74 | 'order_column' => $this->sortBy, 75 | 'order_direction' => $this->sortDirection, 76 | ]); 77 | 78 | $users = $query->paginate($this->perPage); 79 | 80 | return view('livewire.user.index', compact('query', 'users', 'users')); 81 | } 82 | 83 | public function deleteSelected() 84 | { 85 | abort_if(Gate::denies('user_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 86 | 87 | User::whereIn('id', $this->selected)->delete(); 88 | 89 | $this->resetSelected(); 90 | } 91 | 92 | public function delete(User $user) 93 | { 94 | abort_if(Gate::denies('user_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); 95 | 96 | $user->delete(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/Http/Livewire/WithConfirmation.php: -------------------------------------------------------------------------------- 1 | emit('confirm', compact('callback', 'argv')); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/Http/Livewire/WithSorting.php: -------------------------------------------------------------------------------- 1 | sortBy = $field; 13 | 14 | $this->sortDirection = $this->sortBy === $field 15 | ? $this->reverseSort() 16 | : 'asc'; 17 | } 18 | 19 | public function reverseSort() 20 | { 21 | return $this->sortDirection === 'asc' 22 | ? 'desc' 23 | : 'asc'; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Http/Middleware/AuthGates.php: -------------------------------------------------------------------------------- 1 | user(); 15 | 16 | if ($user) { 17 | $roles = Role::with('permissions')->get(); 18 | $permissionsArray = []; 19 | 20 | foreach ($roles as $role) { 21 | foreach ($role->permissions as $permissions) { 22 | $permissionsArray[$permissions->title][] = $role->id; 23 | } 24 | } 25 | 26 | foreach ($permissionsArray as $title => $roles) { 27 | Gate::define($title, function (User $user) use ($roles) { 28 | return count(array_intersect($user->roles->pluck('id')->toArray(), $roles)) > 0; 29 | }); 30 | } 31 | } 32 | 33 | return $next($request); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/SetPreferredLocale.php: -------------------------------------------------------------------------------- 1 | setLocale($locales[0]); 14 | 15 | // Auto-detect locale between browser and supported languages 16 | // $locales = array_column(config('project.supported_languages'), 'short_code'); 17 | // $language = $request->getPreferredLanguage($locales); 18 | // app()->setLocale($language); 19 | 20 | return $next($request); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | format('Y-m-d H:i:s'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Models/ContactContact.php: -------------------------------------------------------------------------------- 1 | belongsTo(ContactCompany::class); 63 | } 64 | 65 | protected function serializeDate(DateTimeInterface $date) 66 | { 67 | return $date->format('Y-m-d H:i:s'); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/Models/Permission.php: -------------------------------------------------------------------------------- 1 | format('Y-m-d H:i:s'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Models/Role.php: -------------------------------------------------------------------------------- 1 | belongsToMany(Permission::class); 43 | } 44 | 45 | protected function serializeDate(DateTimeInterface $date) 46 | { 47 | return $date->format('Y-m-d H:i:s'); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/Models/Transaction.php: -------------------------------------------------------------------------------- 1 | format(config('project.date_format')) : null; 47 | } 48 | 49 | public function setTransactionDateAttribute($value) 50 | { 51 | $this->attributes['transaction_date'] = $value ? Carbon::createFromFormat(config('project.date_format'), $value)->format('Y-m-d') : null; 52 | } 53 | 54 | protected function serializeDate(DateTimeInterface $date) 55 | { 56 | return $date->format('Y-m-d H:i:s'); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | roles()->where('title', 'Admin')->exists(); 61 | } 62 | 63 | public function getEmailVerifiedAtAttribute($value) 64 | { 65 | return $value ? Carbon::createFromFormat('Y-m-d H:i:s', $value)->format(config('project.datetime_format')) : null; 66 | } 67 | 68 | public function setEmailVerifiedAtAttribute($value) 69 | { 70 | $this->attributes['email_verified_at'] = $value ? Carbon::createFromFormat(config('project.datetime_format'), $value)->format('Y-m-d H:i:s') : null; 71 | } 72 | 73 | public function setPasswordAttribute($input) 74 | { 75 | if ($input) { 76 | $this->attributes['password'] = Hash::needsRehash($input) ? Hash::make($input) : $input; 77 | } 78 | } 79 | 80 | public function roles() 81 | { 82 | return $this->belongsToMany(Role::class); 83 | } 84 | 85 | protected function serializeDate(DateTimeInterface $date) 86 | { 87 | return $date->format('Y-m-d H:i:s'); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 37 | 38 | $this->routes(function () { 39 | Route::prefix('api') 40 | ->middleware('api') 41 | ->namespace($this->namespace) 42 | ->group(base_path('routes/api.php')); 43 | 44 | Route::middleware('web') 45 | ->namespace($this->namespace) 46 | ->group(base_path('routes/web.php')); 47 | }); 48 | } 49 | 50 | /** 51 | * Configure the rate limiters for the application. 52 | */ 53 | protected function configureRateLimiting() 54 | { 55 | RateLimiter::for('api', function (Request $request) { 56 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 57 | }); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/Support/FilterQueryBuilder.php: -------------------------------------------------------------------------------- 1 | model = $query->getModel(); 16 | $this->table = $this->model->getTable(); 17 | 18 | if (isset($data['f'])) { 19 | foreach ($data['f'] as $filter) { 20 | $filter['match'] = $data['filter_match'] ?? 'and'; 21 | $this->makeFilter($query, $filter); 22 | } 23 | } 24 | 25 | $this->makeOrder($query, $data); 26 | 27 | return $query; 28 | } 29 | 30 | public function contains($filter, $query) 31 | { 32 | return $query->where($filter['column'], 'like', '%' . $filter['query_1'] . '%', $filter['match']); 33 | } 34 | 35 | protected function makeOrder($query, $data) 36 | { 37 | if ($this->isNestedColumn($data['order_column'])) { 38 | [$relationship, $column] = explode('.', $data['order_column']); 39 | $callable = Str::camel($relationship); 40 | $belongs = $this->model->{$callable}( 41 | ); 42 | $relatedModel = $belongs->getModel(); 43 | $relatedTable = $relatedModel->getTable(); 44 | $as = "prefix_{$relatedTable}"; 45 | 46 | if (!$belongs instanceof BelongsTo) { 47 | return; 48 | } 49 | 50 | $query->leftJoin( 51 | "{$relatedTable} as {$as}", 52 | "{$as}.id", 53 | '=', 54 | "{$this->table}.{$relationship}_id" 55 | ); 56 | 57 | $data['order_column'] = "{$as}.{$column}"; 58 | } 59 | 60 | $query 61 | ->orderBy($data['order_column'], $data['order_direction']) 62 | ->select("{$this->table}.*"); 63 | } 64 | 65 | protected function makeFilter($query, $filter) 66 | { 67 | if ($this->isNestedColumn($filter['column'])) { 68 | [$relation, $filter['column']] = explode('.', $filter['column']); 69 | $callable = Str::camel($relation); 70 | $filter['match'] = 'and'; 71 | 72 | $query->orWhereHas(Str::camel($callable), function ($q) use ($filter) { 73 | $this->{Str::camel($filter['operator'])}( 74 | $filter, 75 | $q 76 | ); 77 | }); 78 | } else { 79 | $filter['column'] = "{$this->table}.{$filter['column']}"; 80 | $this->{Str::camel($filter['operator'])}( 81 | $filter, 82 | $query 83 | ); 84 | } 85 | } 86 | 87 | protected function isNestedColumn($column) 88 | { 89 | return strpos($column, '.') !== false; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/Support/HasAdvancedFilter.php: -------------------------------------------------------------------------------- 1 | processQuery($query, $data); 12 | } 13 | 14 | public function processQuery($query, $data) 15 | { 16 | $data = $this->processGlobalSearch($data); 17 | 18 | $v = validator()->make($data, [ 19 | 's' => 'sometimes|nullable|string', 20 | 'order_column' => 'sometimes|required|in:' . $this->orderableColumns(), 21 | 'order_direction' => 'sometimes|required|in:asc,desc', 22 | // 'limit' => 'sometimes|required|integer|min:1', 23 | 24 | // advanced filter 25 | 'filter_match' => 'sometimes|required|in:and,or', 26 | 'f' => 'sometimes|required|array', 27 | 'f.*.column' => 'required|in:' . $this->whiteListColumns(), 28 | 'f.*.operator' => 'required_with:f.*.column|in:' . $this->allowedOperators(), 29 | 'f.*.query_1' => 'required', 30 | 'f.*.query_2' => 'required_if:f.*.operator,between,not_between', 31 | ]); 32 | 33 | if ($v->fails()) { 34 | throw new ValidationException($v); 35 | } 36 | 37 | $data = $v->validated(); 38 | 39 | return (new FilterQueryBuilder())->apply($query, $data); 40 | } 41 | 42 | protected function orderableColumns() 43 | { 44 | return implode(',', $this->orderable); 45 | } 46 | 47 | protected function whiteListColumns() 48 | { 49 | return implode(',', $this->filterable); 50 | } 51 | 52 | protected function allowedOperators() 53 | { 54 | return implode(',', [ 55 | 'contains', 56 | ]); 57 | } 58 | 59 | protected function processGlobalSearch($data) 60 | { 61 | if (isset($data['f']) || !isset($data['s'])) { 62 | return $data; 63 | } 64 | 65 | $data['filter_match'] = 'or'; 66 | 67 | $data['f'] = array_map(function ($column) use ($data) { 68 | return [ 69 | 'column' => $column, 70 | 'operator' => 'contains', 71 | 'query_1' => $data['s'], 72 | ]; 73 | }, $this->filterable); 74 | 75 | return $data; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/View/Components/DatePicker.php: -------------------------------------------------------------------------------- 1 | options = $options; 20 | } 21 | 22 | /** 23 | * Get the view / contents that represent the component. 24 | * 25 | * @return \Illuminate\Contracts\View\View|string 26 | */ 27 | public function render() 28 | { 29 | return view('components.select-list'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.3|^8.0", 12 | "bugsnag/bugsnag-laravel": "^2.21", 13 | "doctrine/dbal": "^3.0", 14 | "fideloper/proxy": "^4.4", 15 | "fruitcake/laravel-cors": "^2.0", 16 | "guzzlehttp/guzzle": "^7.0.1", 17 | "laravel/dusk": "^6.11", 18 | "laravel/framework": "^8.12", 19 | "laravel/tinker": "^2.5", 20 | "laravel/ui": "^3.2", 21 | "livewire/livewire": "^2.3", 22 | "laravel/sanctum": "^2.8" 23 | }, 24 | "require-dev": { 25 | "facade/ignition": "^2.5", 26 | "fakerphp/faker": "^1.9.1", 27 | "laravel/sail": "^1.0.1", 28 | "mockery/mockery": "^1.4.2", 29 | "nunomaduro/collision": "^5.0", 30 | "phpunit/phpunit": "^9.3.3" 31 | }, 32 | "config": { 33 | "optimize-autoloader": true, 34 | "preferred-install": "dist", 35 | "sort-packages": true 36 | }, 37 | "extra": { 38 | "laravel": { 39 | "dont-discover": [] 40 | } 41 | }, 42 | "autoload": { 43 | "psr-4": { 44 | "App\\": "app/", 45 | "Database\\Factories\\": "database/factories/", 46 | "Database\\Seeders\\": "database/seeders/" 47 | } 48 | }, 49 | "autoload-dev": { 50 | "psr-4": { 51 | "Tests\\": "tests/" 52 | } 53 | }, 54 | "minimum-stability": "dev", 55 | "prefer-stable": true, 56 | "scripts": { 57 | "post-autoload-dump": [ 58 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 59 | "@php artisan package:discover --ansi", 60 | "@php artisan vendor:publish --force --tag=livewire:assets --ansi" 61 | ], 62 | "post-root-package-install": [ 63 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 64 | ], 65 | "post-create-project-cmd": [ 66 | "@php artisan key:generate --ansi" 67 | ] 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been setup for each driver as an example of the required options. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | ], 37 | 38 | 'public' => [ 39 | 'driver' => 'local', 40 | 'root' => storage_path('app/public'), 41 | 'url' => env('APP_URL').'/storage', 42 | 'visibility' => 'public', 43 | ], 44 | 45 | 's3' => [ 46 | 'driver' => 's3', 47 | 'key' => env('AWS_ACCESS_KEY_ID'), 48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 49 | 'region' => env('AWS_DEFAULT_REGION'), 50 | 'bucket' => env('AWS_BUCKET'), 51 | 'url' => env('AWS_URL'), 52 | 'endpoint' => env('AWS_ENDPOINT'), 53 | ], 54 | 55 | ], 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Symbolic Links 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Here you may configure the symbolic links that will be created when the 63 | | `storage:link` Artisan command is executed. The array keys should be 64 | | the locations of the links and the values should be their targets. 65 | | 66 | */ 67 | 68 | 'links' => [ 69 | public_path('storage') => storage_path('app/public'), 70 | ], 71 | 72 | ]; 73 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => env('LOG_LEVEL', 'debug'), 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => env('LOG_LEVEL', 'debug'), 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => env('LOG_LEVEL', 'critical'), 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => env('LOG_LEVEL', 'debug'), 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'handler' => StreamHandler::class, 78 | 'formatter' => env('LOG_STDERR_FORMATTER'), 79 | 'with' => [ 80 | 'stream' => 'php://stderr', 81 | ], 82 | ], 83 | 84 | 'syslog' => [ 85 | 'driver' => 'syslog', 86 | 'level' => env('LOG_LEVEL', 'debug'), 87 | ], 88 | 89 | 'errorlog' => [ 90 | 'driver' => 'errorlog', 91 | 'level' => env('LOG_LEVEL', 'debug'), 92 | ], 93 | 94 | 'null' => [ 95 | 'driver' => 'monolog', 96 | 'handler' => NullHandler::class, 97 | ], 98 | 99 | 'emergency' => [ 100 | 'path' => storage_path('logs/laravel.log'), 101 | ], 102 | ], 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /config/project.php: -------------------------------------------------------------------------------- 1 | 'Y-m-d', 5 | 'time_format' => 'H:i:s', 6 | 'datetime_format' => 'Y-m-d H:i:s', 7 | 'flatpickr_date_format' => 'Y-m-d', 8 | 'flatpickr_time_format' => 'H:i:S', 9 | 'flatpickr_datetime_format' => 'Y-m-d H:i:S', 10 | 'supported_languages' => [ 11 | [ 12 | 'title' => 'English', 13 | 'short_code' => 'en', 14 | ], 15 | ], 16 | 'pagination' => [ 17 | 'options' => [ 18 | 10, 19 | 25, 20 | 50, 21 | 100, 22 | ], 23 | ], 24 | ]; 25 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'suffix' => env('SQS_SUFFIX'), 59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 60 | ], 61 | 62 | 'redis' => [ 63 | 'driver' => 'redis', 64 | 'connection' => 'default', 65 | 'queue' => env('REDIS_QUEUE', 'default'), 66 | 'retry_after' => 90, 67 | 'block_for' => null, 68 | ], 69 | 70 | ], 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Failed Queue Jobs 75 | |-------------------------------------------------------------------------- 76 | | 77 | | These options configure the behavior of failed queue job logging so you 78 | | can control which database and table are used to store the jobs that 79 | | have failed. You may change them to any database / table you wish. 80 | | 81 | */ 82 | 83 | 'failed' => [ 84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 85 | 'database' => env('DB_CONNECTION', 'mysql'), 86 | 'table' => 'failed_jobs', 87 | ], 88 | 89 | ]; 90 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name, 27 | 'email' => $this->faker->unique()->safeEmail, 28 | 'email_verified_at' => now(), 29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 16 | $table->string('token'); 17 | $table->timestamp('created_at')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down() 25 | { 26 | Schema::dropIfExists('password_resets'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000001_create_permissions_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->string('title'); 14 | $table->timestamps(); 15 | $table->softDeletes(); 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000002_create_roles_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->string('title')->nullable(); 14 | $table->timestamps(); 15 | $table->softDeletes(); 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000003_create_users_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->string('name'); 14 | $table->string('email')->unique(); 15 | $table->datetime('email_verified_at')->nullable(); 16 | $table->string('password'); 17 | $table->string('remember_token')->nullable(); 18 | $table->timestamps(); 19 | $table->softDeletes(); 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000004_create_contact_companies_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->string('company_name')->nullable(); 14 | $table->string('company_address')->nullable(); 15 | $table->string('company_website')->nullable(); 16 | $table->string('company_email')->nullable(); 17 | $table->timestamps(); 18 | $table->softDeletes(); 19 | }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000005_create_contact_contacts_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->string('contact_first_name')->nullable(); 14 | $table->string('contact_last_name')->nullable(); 15 | $table->string('contact_phone_1')->nullable(); 16 | $table->string('contact_phone_2')->nullable(); 17 | $table->string('contact_email')->nullable(); 18 | $table->string('contact_skype')->nullable(); 19 | $table->string('contact_address')->nullable(); 20 | $table->timestamps(); 21 | $table->softDeletes(); 22 | }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000006_create_transactions_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->decimal('amount', 15, 2)->nullable(); 14 | $table->date('transaction_date')->nullable(); 15 | $table->timestamps(); 16 | $table->softDeletes(); 17 | }); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000007_create_permission_role_pivot_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('role_id'); 13 | $table->foreign('role_id', 'role_id_fk_3707274')->references('id')->on('roles')->onDelete('cascade'); 14 | $table->unsignedBigInteger('permission_id'); 15 | $table->foreign('permission_id', 'permission_id_fk_3707274')->references('id')->on('permissions')->onDelete('cascade'); 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000008_create_role_user_pivot_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('user_id'); 13 | $table->foreign('user_id', 'user_id_fk_3707283')->references('id')->on('users')->onDelete('cascade'); 14 | $table->unsignedBigInteger('role_id'); 15 | $table->foreign('role_id', 'role_id_fk_3707283')->references('id')->on('roles')->onDelete('cascade'); 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/migrations/2021_04_18_000009_add_relationship_fields_to_contact_contacts_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('company_id'); 13 | $table->foreign('company_id', 'company_fk_3707298')->references('id')->on('contact_companies'); 14 | }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call([ 12 | PermissionsTableSeeder::class, 13 | RolesTableSeeder::class, 14 | PermissionRoleTableSeeder::class, 15 | UsersTableSeeder::class, 16 | RoleUserTableSeeder::class, 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/seeders/PermissionRoleTableSeeder.php: -------------------------------------------------------------------------------- 1 | permissions()->sync($admin_permissions->pluck('id')); 15 | $user_permissions = $admin_permissions->filter(function ($permission) { 16 | return substr($permission->title, 0, 5) != 'user_' && substr($permission->title, 0, 5) != 'role_' && substr($permission->title, 0, 11) != 'permission_'; 17 | }); 18 | Role::findOrFail(2)->permissions()->sync($user_permissions); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /database/seeders/RoleUserTableSeeder.php: -------------------------------------------------------------------------------- 1 | roles()->sync(1); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /database/seeders/RolesTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 15 | 'title' => 'Admin', 16 | ], 17 | [ 18 | 'id' => 2, 19 | 'title' => 'User', 20 | ], 21 | ]; 22 | 23 | Role::insert($roles); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeders/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 15 | 'name' => 'Admin', 16 | 'email' => 'admin@admin.com', 17 | 'password' => bcrypt('password'), 18 | 'remember_token' => null, 19 | ], 20 | ]; 21 | 22 | User::insert($users); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "@tailwindcss/forms": "^0.2.1", 14 | "@tailwindcss/postcss7-compat": "^2.0.2", 15 | "autoprefixer": "^9.8.6", 16 | "axios": "^0.21.1", 17 | "cross-env": "^7.0.3", 18 | "dropzone": "^5.9.2", 19 | "flatpickr": "^4.6.9", 20 | "jquery": "^3.2", 21 | "laravel-mix": "^5.0.9", 22 | "lodash": "^4.17.19", 23 | "postcss": "^7.0.35", 24 | "resolve-url-loader": "^3.1.2", 25 | "select2": "^4.0.13", 26 | "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.2", 27 | "vue-template-compiler": "^2.6.12" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LaravelDaily/QuickAdminPanel-Livewire-Tailwind-Example/cb2469d3dd60e0ab3c8ecaf4449a80de44eaff4a/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/js/app.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Sizzle CSS Selector Engine v2.3.6 3 | * https://sizzlejs.com/ 4 | * 5 | * Copyright JS Foundation and other contributors 6 | * Released under the MIT license 7 | * https://js.foundation/ 8 | * 9 | * Date: 2021-02-16 10 | */ 11 | 12 | /*! 13 | * jQuery JavaScript Library v3.6.0 14 | * https://jquery.com/ 15 | * 16 | * Includes Sizzle.js 17 | * https://sizzlejs.com/ 18 | * 19 | * Copyright OpenJS Foundation and other contributors 20 | * Released under the MIT license 21 | * https://jquery.org/license 22 | * 23 | * Date: 2021-03-02T17:08Z 24 | */ 25 | 26 | /** 27 | * @license 28 | * Lodash 29 | * Copyright OpenJS Foundation and other contributors 30 | * Released under MIT license 31 | * Based on Underscore.js 1.8.3 32 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 33 | */ 34 | 35 | /** 36 | * @license almond 0.3.3 Copyright jQuery Foundation and other contributors. 37 | * Released under MIT license, http://github.com/requirejs/almond/LICENSE 38 | */ 39 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/vendor/livewire/manifest.json: -------------------------------------------------------------------------------- 1 | {"/livewire.js":"/livewire.js?id=54d078b2ce39327a1702"} -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @import "theme.css"; 6 | @import "~select2/dist/css/select2.min.css"; 7 | @import "select.css"; 8 | @import "~dropzone/dist/dropzone.css"; 9 | @import "~flatpickr/dist/flatpickr.min.css"; 10 | -------------------------------------------------------------------------------- /resources/css/select.css: -------------------------------------------------------------------------------- 1 | .select2 { 2 | @apply w-full border-0 placeholder-blueGray-300 text-blueGray-600 bg-white rounded text-sm shadow focus:outline-none focus:ring !important; 3 | } 4 | 5 | .select2-dropdown { 6 | @apply absolute block w-auto box-border bg-white shadow-lg border-blueGray-200 z-50 float-left; 7 | } 8 | 9 | .select2-container--default .select2-selection--single { 10 | @apply border-0 h-11 flex items-center text-sm 11 | } 12 | 13 | .select2-container--default .select2-selection--multiple { 14 | @apply border-0 text-sm 15 | } 16 | 17 | 18 | .select2-container--default.select2-container--focus .select2-selection--single, 19 | .select2-container--default.select2-container--focus .select2-selection--multiple { 20 | @apply border-0 outline-none ring ring-blue-600 21 | } 22 | 23 | .select2-container--default .select2-selection--single .select2-selection__arrow { 24 | top: 9px; 25 | } 26 | 27 | .select2-container .select2-selection--single .select2-selection__rendered { 28 | @apply px-3 py-3 text-blueGray-600 29 | } 30 | 31 | .select2-container .select2-selection--multiple .select2-selection__rendered { 32 | @apply px-3 py-2 text-blueGray-600 33 | } 34 | 35 | .select2-container--default .select2-selection--single .select2-selection__rendered { 36 | line-height: inherit; 37 | } 38 | 39 | .select2-selection__choice { 40 | @apply text-xs font-semibold inline-block py-1 px-2 rounded text-indigo-600 bg-indigo-200 border-0 !important; 41 | } 42 | 43 | .select2-selection__choice span { 44 | @apply text-white !important; 45 | } 46 | 47 | .select2-search__field:focus { 48 | outline: none; 49 | } 50 | 51 | .select2-container--default .select2-selection--single .select2-selection__clear { 52 | @apply text-rose-500 ml-1 !important 53 | } 54 | 55 | .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { 56 | @apply text-indigo-600 mr-1 !important 57 | } 58 | 59 | .select-all, .deselect-all { 60 | @apply cursor-pointer; 61 | font-size: 0.5rem !important; 62 | } 63 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First we will load all of this project's JavaScript dependencies which 3 | * includes Vue and other libraries. It is a great starting point when 4 | * building robust, powerful web applications using Vue and Laravel. 5 | */ 6 | 7 | require('./bootstrap') 8 | 9 | /* Sidebar - Side navigation menu on mobile/responsive mode */ 10 | window.toggleNavbar = function (collapseID) { 11 | document.getElementById(collapseID).classList.toggle('hidden') 12 | document.getElementById(collapseID).classList.toggle('bg-white') 13 | document.getElementById(collapseID).classList.toggle('m-2') 14 | document.getElementById(collapseID).classList.toggle('py-3') 15 | document.getElementById(collapseID).classList.toggle('px-6') 16 | } 17 | 18 | /* Opens sidebar navigation that contains sub-items */ 19 | window.openSubNav = function (el) { 20 | let parent = el.parentElement 21 | 22 | let subnavs = document.getElementsByClassName('subnav') 23 | for (let i = 0; i < subnavs.length; i++) { 24 | if (!subnavs[i].classList.contains('hidden')) { 25 | subnavs[i].classList.add('hidden') 26 | } 27 | } 28 | 29 | parent.getElementsByClassName('subnav')[0].classList.remove('hidden') 30 | } 31 | 32 | window.initialSubNavLoad = function () { 33 | let active = document.getElementsByClassName('has-sub sidebar-nav-active') 34 | if (active[0]) { 35 | window.openSubNav(active[0]) 36 | } 37 | } 38 | 39 | initialSubNavLoad() 40 | /* Opens sidebar navigation that contains sub-items */ 41 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.$ = window.jQuery = require('jquery'); 11 | require('select2') 12 | window.Dropzone = require('dropzone').default 13 | require('flatpickr') 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Echo exposes an expressive API for subscribing to channels and listening 28 | * for events that are broadcast by Laravel. Echo and event broadcasting 29 | * allows your team to easily build robust real-time web applications. 30 | */ 31 | 32 | // import Echo from 'laravel-echo'; 33 | 34 | // window.Pusher = require('pusher-js'); 35 | 36 | // window.Echo = new Echo({ 37 | // broadcaster: 'pusher', 38 | // key: process.env.MIX_PUSHER_APP_KEY, 39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 40 | // forceTLS: true 41 | // }); 42 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 5 | 'password' => 'The provided password is incorrect.', 6 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 5 | 'next' => 'Next »', 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/en/panel.php: -------------------------------------------------------------------------------- 1 | 'Livewire Demo', 5 | ]; 6 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 5 | 'reset' => 'Your password has been reset!', 6 | 'sent' => 'We have e-mailed your password reset link!', 7 | 'token' => 'This password reset token is invalid.', 8 | 'user' => 'We can\'t find a user with that e-mail address.', 9 | 'updated' => 'Your password has been changed!', 10 | ]; 11 | -------------------------------------------------------------------------------- /resources/views/admin/contact-company/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.create') }} 9 | {{ trans('cruds.contactCompany.title_singular') }} 10 |
11 |
12 |
13 | 14 |
15 | @livewire('contact-company.create') 16 |
17 |
18 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/contact-company/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.edit') }} 9 | {{ trans('cruds.contactCompany.title_singular') }}: 10 | {{ trans('cruds.contactCompany.fields.id') }} 11 | {{ $contactCompany->id }} 12 |
13 |
14 |
15 | 16 |
17 | @livewire('contact-company.edit', [$contactCompany]) 18 |
19 |
20 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/contact-company/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 |
5 |
6 |
7 | {{ trans('cruds.contactCompany.title_singular') }} 8 | {{ trans('global.list') }} 9 |
10 | 11 | @can('contact_company_create') 12 | 13 | {{ trans('global.add') }} {{ trans('cruds.contactCompany.title_singular') }} 14 | 15 | @endcan 16 |
17 |
18 | @livewire('contact-company.index') 19 | 20 |
21 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/contact-company/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.view') }} 9 | {{ trans('cruds.contactCompany.title_singular') }}: 10 | {{ trans('cruds.contactCompany.fields.id') }} 11 | {{ $contactCompany->id }} 12 |
13 |
14 |
15 | 16 |
17 |
18 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 | 40 | 43 | 44 | 45 | 48 | 51 | 52 | 53 | 56 | 59 | 60 | 61 |
22 | {{ trans('cruds.contactCompany.fields.id') }} 23 | 25 | {{ $contactCompany->id }} 26 |
30 | {{ trans('cruds.contactCompany.fields.company_name') }} 31 | 33 | {{ $contactCompany->company_name }} 34 |
38 | {{ trans('cruds.contactCompany.fields.company_address') }} 39 | 41 | {{ $contactCompany->company_address }} 42 |
46 | {{ trans('cruds.contactCompany.fields.company_website') }} 47 | 49 | {{ $contactCompany->company_website }} 50 |
54 | {{ trans('cruds.contactCompany.fields.company_email') }} 55 | 57 | {{ $contactCompany->company_email }} 58 |
62 |
63 | 68 |
69 |
70 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/contact-contact/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.create') }} 9 | {{ trans('cruds.contactContact.title_singular') }} 10 |
11 |
12 |
13 | 14 |
15 | @livewire('contact-contact.create') 16 |
17 |
18 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/contact-contact/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.edit') }} 9 | {{ trans('cruds.contactContact.title_singular') }}: 10 | {{ trans('cruds.contactContact.fields.id') }} 11 | {{ $contactContact->id }} 12 |
13 |
14 |
15 | 16 |
17 | @livewire('contact-contact.edit', [$contactContact]) 18 |
19 |
20 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/contact-contact/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 |
5 |
6 |
7 | {{ trans('cruds.contactContact.title_singular') }} 8 | {{ trans('global.list') }} 9 |
10 | 11 | @can('contact_contact_create') 12 | 13 | {{ trans('global.add') }} {{ trans('cruds.contactContact.title_singular') }} 14 | 15 | @endcan 16 |
17 |
18 | @livewire('contact-contact.index') 19 | 20 |
21 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 |
9 | Dashboard 10 |
11 |
12 |
13 | 14 |
15 | @if(session('status')) 16 | 19 | @endif 20 | 21 |

You are logged in!

22 |
23 |
24 |
25 | 26 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permission/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.create') }} 9 | {{ trans('cruds.permission.title_singular') }} 10 |
11 |
12 |
13 | 14 |
15 | @livewire('permission.create') 16 |
17 |
18 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permission/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.edit') }} 9 | {{ trans('cruds.permission.title_singular') }}: 10 | {{ trans('cruds.permission.fields.id') }} 11 | {{ $permission->id }} 12 |
13 |
14 |
15 | 16 |
17 | @livewire('permission.edit', [$permission]) 18 |
19 |
20 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permission/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 |
5 |
6 |
7 | {{ trans('cruds.permission.title_singular') }} 8 | {{ trans('global.list') }} 9 |
10 | 11 | @can('permission_create') 12 | 13 | {{ trans('global.add') }} {{ trans('cruds.permission.title_singular') }} 14 | 15 | @endcan 16 |
17 |
18 | @livewire('permission.index') 19 | 20 |
21 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/permission/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.view') }} 9 | {{ trans('cruds.permission.title_singular') }}: 10 | {{ trans('cruds.permission.fields.id') }} 11 | {{ $permission->id }} 12 |
13 |
14 |
15 | 16 |
17 |
18 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 |
22 | {{ trans('cruds.permission.fields.id') }} 23 | 25 | {{ $permission->id }} 26 |
30 | {{ trans('cruds.permission.fields.title') }} 31 | 33 | {{ $permission->title }} 34 |
38 |
39 | 44 |
45 |
46 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/role/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.create') }} 9 | {{ trans('cruds.role.title_singular') }} 10 |
11 |
12 |
13 | 14 |
15 | @livewire('role.create') 16 |
17 |
18 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/role/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.edit') }} 9 | {{ trans('cruds.role.title_singular') }}: 10 | {{ trans('cruds.role.fields.id') }} 11 | {{ $role->id }} 12 |
13 |
14 |
15 | 16 |
17 | @livewire('role.edit', [$role]) 18 |
19 |
20 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/role/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 |
5 |
6 |
7 | {{ trans('cruds.role.title_singular') }} 8 | {{ trans('global.list') }} 9 |
10 | 11 | @can('role_create') 12 | 13 | {{ trans('global.add') }} {{ trans('cruds.role.title_singular') }} 14 | 15 | @endcan 16 |
17 |
18 | @livewire('role.index') 19 | 20 |
21 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/role/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.view') }} 9 | {{ trans('cruds.role.title_singular') }}: 10 | {{ trans('cruds.role.fields.id') }} 11 | {{ $role->id }} 12 |
13 |
14 |
15 | 16 |
17 |
18 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 | 40 | 45 | 46 | 47 |
22 | {{ trans('cruds.role.fields.id') }} 23 | 25 | {{ $role->id }} 26 |
30 | {{ trans('cruds.role.fields.title') }} 31 | 33 | {{ $role->title }} 34 |
38 | {{ trans('cruds.role.fields.permissions') }} 39 | 41 | @foreach($role->permissions as $key => $entry) 42 | {{ $entry->title }} 43 | @endforeach 44 |
48 |
49 | 54 |
55 |
56 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/transaction/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.create') }} 9 | {{ trans('cruds.transaction.title_singular') }} 10 |
11 |
12 |
13 | 14 |
15 | @livewire('transaction.create') 16 |
17 |
18 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/transaction/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.edit') }} 9 | {{ trans('cruds.transaction.title_singular') }}: 10 | {{ trans('cruds.transaction.fields.id') }} 11 | {{ $transaction->id }} 12 |
13 |
14 |
15 | 16 |
17 | @livewire('transaction.edit', [$transaction]) 18 |
19 |
20 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/transaction/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 |
5 |
6 |
7 | {{ trans('cruds.transaction.title_singular') }} 8 | {{ trans('global.list') }} 9 |
10 | 11 | @can('transaction_create') 12 | 13 | {{ trans('global.add') }} {{ trans('cruds.transaction.title_singular') }} 14 | 15 | @endcan 16 |
17 |
18 | @livewire('transaction.index') 19 | 20 |
21 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/transaction/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.view') }} 9 | {{ trans('cruds.transaction.title_singular') }}: 10 | {{ trans('cruds.transaction.fields.id') }} 11 | {{ $transaction->id }} 12 |
13 |
14 |
15 | 16 |
17 |
18 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 | 40 | 43 | 44 | 45 |
22 | {{ trans('cruds.transaction.fields.id') }} 23 | 25 | {{ $transaction->id }} 26 |
30 | {{ trans('cruds.transaction.fields.amount') }} 31 | 33 | {{ $transaction->amount }} 34 |
38 | {{ trans('cruds.transaction.fields.transaction_date') }} 39 | 41 | {{ $transaction->transaction_date }} 42 |
46 |
47 | 52 |
53 |
54 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/user/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.create') }} 9 | {{ trans('cruds.user.title_singular') }} 10 |
11 |
12 |
13 | 14 |
15 | @livewire('user.create') 16 |
17 |
18 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/user/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.edit') }} 9 | {{ trans('cruds.user.title_singular') }}: 10 | {{ trans('cruds.user.fields.id') }} 11 | {{ $user->id }} 12 |
13 |
14 |
15 | 16 |
17 | @livewire('user.edit', [$user]) 18 |
19 |
20 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/user/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 |
4 |
5 |
6 |
7 | {{ trans('cruds.user.title_singular') }} 8 | {{ trans('global.list') }} 9 |
10 | 11 | @can('user_create') 12 | 13 | {{ trans('global.add') }} {{ trans('cruds.user.title_singular') }} 14 | 15 | @endcan 16 |
17 |
18 | @livewire('user.index') 19 | 20 |
21 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/user/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.admin') 2 | @section('content') 3 | 4 |
5 |
6 |
7 |
8 | {{ trans('global.view') }} 9 | {{ trans('cruds.user.title_singular') }}: 10 | {{ trans('cruds.user.fields.id') }} 11 | {{ $user->id }} 12 |
13 |
14 |
15 | 16 |
17 |
18 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 | 40 | 47 | 48 | 49 | 52 | 55 | 56 | 57 | 60 | 65 | 66 | 67 |
22 | {{ trans('cruds.user.fields.id') }} 23 | 25 | {{ $user->id }} 26 |
30 | {{ trans('cruds.user.fields.name') }} 31 | 33 | {{ $user->name }} 34 |
38 | {{ trans('cruds.user.fields.email') }} 39 | 41 | 42 | 43 | 44 | {{ $user->email }} 45 | 46 |
50 | {{ trans('cruds.user.fields.email_verified_at') }} 51 | 53 | {{ $user->email_verified_at }} 54 |
58 | {{ trans('cruds.user.fields.roles') }} 59 | 61 | @foreach($user->roles as $key => $entry) 62 | {{ $entry->title }} 63 | @endforeach 64 |
68 |
69 | 74 |
75 |
76 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 |
12 | {{ __('Please confirm your password before continuing.') }} 13 |
14 | 15 |
16 | @csrf 17 | 18 |
19 | 20 | 21 |
22 | 23 | 24 | @error('password') 25 | 26 | {{ $message }} 27 | 28 | @enderror 29 |
30 |
31 | 32 |
33 |
34 | 37 | 38 | @if(Route::has('password.request')) 39 | 40 | {{ __('Forgot Your Password?') }} 41 | 42 | @endif 43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if(session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection -------------------------------------------------------------------------------- /resources/views/components/date-picker.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | @if(!isset($attributes['required'])) 4 |
5 | 8 |
9 | @endif 10 | 11 | 12 |
13 |
14 | 15 | @push('scripts') 16 | 77 | @endpush -------------------------------------------------------------------------------- /resources/views/components/dropzone.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | @push('scripts') 6 | 73 | @endpush -------------------------------------------------------------------------------- /resources/views/components/footer.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/components/select-list.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | @if(isset($attributes['multiple'])) 4 |
5 | 6 | 7 |
8 | @endif 9 | 17 |
18 |
19 | 20 | @push('scripts') 21 | 59 | @endpush -------------------------------------------------------------------------------- /resources/views/components/table/sort.blade.php: -------------------------------------------------------------------------------- 1 | @if(in_array($field, $orderable)) 2 | @if($sortBy !== $field) 3 | 4 | @elseif($sortBy === $field && $sortDirection == 'desc') 5 | 6 | @else 7 | 8 | @endif 9 | @endif -------------------------------------------------------------------------------- /resources/views/layouts/admin.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ trans('panel.site_title') }} 11 | @livewireStyles 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 |
23 | 24 |
25 | @yield('content') 26 | 27 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 | @livewireScripts 38 | @yield('scripts') 39 | @stack('scripts') 40 | 41 | 42 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ trans('panel.site_title') }} 11 | @livewireStyles 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 | @yield('content') 23 |
24 |
25 | 26 |
27 | 28 | 31 | 32 | 33 | @livewireScripts 34 | 35 | 36 | -------------------------------------------------------------------------------- /resources/views/livewire/contact-company/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('contactCompany.company_name') }} 8 |
9 |
10 | {{ trans('cruds.contactCompany.fields.company_name_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('contactCompany.company_address') }} 18 |
19 |
20 | {{ trans('cruds.contactCompany.fields.company_address_helper') }} 21 |
22 |
23 |
24 | 25 | 26 |
27 | {{ $errors->first('contactCompany.company_website') }} 28 |
29 |
30 | {{ trans('cruds.contactCompany.fields.company_website_helper') }} 31 |
32 |
33 |
34 | 35 | 36 |
37 | {{ $errors->first('contactCompany.company_email') }} 38 |
39 |
40 | {{ trans('cruds.contactCompany.fields.company_email_helper') }} 41 |
42 |
43 | 44 |
45 | 48 | 49 | {{ trans('global.cancel') }} 50 | 51 |
52 |
-------------------------------------------------------------------------------- /resources/views/livewire/contact-company/edit.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('contactCompany.company_name') }} 8 |
9 |
10 | {{ trans('cruds.contactCompany.fields.company_name_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('contactCompany.company_address') }} 18 |
19 |
20 | {{ trans('cruds.contactCompany.fields.company_address_helper') }} 21 |
22 |
23 |
24 | 25 | 26 |
27 | {{ $errors->first('contactCompany.company_website') }} 28 |
29 |
30 | {{ trans('cruds.contactCompany.fields.company_website_helper') }} 31 |
32 |
33 |
34 | 35 | 36 |
37 | {{ $errors->first('contactCompany.company_email') }} 38 |
39 |
40 | {{ trans('cruds.contactCompany.fields.company_email_helper') }} 41 |
42 |
43 | 44 |
45 | 48 | 49 | {{ trans('global.cancel') }} 50 | 51 |
52 |
-------------------------------------------------------------------------------- /resources/views/livewire/permission/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('permission.title') }} 8 |
9 |
10 | {{ trans('cruds.permission.fields.title_helper') }} 11 |
12 |
13 | 14 |
15 | 18 | 19 | {{ trans('global.cancel') }} 20 | 21 |
22 |
-------------------------------------------------------------------------------- /resources/views/livewire/permission/edit.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('permission.title') }} 8 |
9 |
10 | {{ trans('cruds.permission.fields.title_helper') }} 11 |
12 |
13 | 14 |
15 | 18 | 19 | {{ trans('global.cancel') }} 20 | 21 |
22 |
-------------------------------------------------------------------------------- /resources/views/livewire/role/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('role.title') }} 8 |
9 |
10 | {{ trans('cruds.role.fields.title_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('permissions') }} 18 |
19 |
20 | {{ trans('cruds.role.fields.permissions_helper') }} 21 |
22 |
23 | 24 |
25 | 28 | 29 | {{ trans('global.cancel') }} 30 | 31 |
32 |
-------------------------------------------------------------------------------- /resources/views/livewire/role/edit.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('role.title') }} 8 |
9 |
10 | {{ trans('cruds.role.fields.title_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('permissions') }} 18 |
19 |
20 | {{ trans('cruds.role.fields.permissions_helper') }} 21 |
22 |
23 | 24 |
25 | 28 | 29 | {{ trans('global.cancel') }} 30 | 31 |
32 |
-------------------------------------------------------------------------------- /resources/views/livewire/transaction/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('transaction.amount') }} 8 |
9 |
10 | {{ trans('cruds.transaction.fields.amount_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('transaction.transaction_date') }} 18 |
19 |
20 | {{ trans('cruds.transaction.fields.transaction_date_helper') }} 21 |
22 |
23 | 24 |
25 | 28 | 29 | {{ trans('global.cancel') }} 30 | 31 |
32 |
-------------------------------------------------------------------------------- /resources/views/livewire/transaction/edit.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('transaction.amount') }} 8 |
9 |
10 | {{ trans('cruds.transaction.fields.amount_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('transaction.transaction_date') }} 18 |
19 |
20 | {{ trans('cruds.transaction.fields.transaction_date_helper') }} 21 |
22 |
23 | 24 |
25 | 28 | 29 | {{ trans('global.cancel') }} 30 | 31 |
32 |
-------------------------------------------------------------------------------- /resources/views/livewire/user/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('user.name') }} 8 |
9 |
10 | {{ trans('cruds.user.fields.name_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('user.email') }} 18 |
19 |
20 | {{ trans('cruds.user.fields.email_helper') }} 21 |
22 |
23 |
24 | 25 | 26 |
27 | {{ $errors->first('user.password') }} 28 |
29 |
30 | {{ trans('cruds.user.fields.password_helper') }} 31 |
32 |
33 |
34 | 35 | 36 |
37 | {{ $errors->first('roles') }} 38 |
39 |
40 | {{ trans('cruds.user.fields.roles_helper') }} 41 |
42 |
43 | 44 |
45 | 48 | 49 | {{ trans('global.cancel') }} 50 | 51 |
52 |
-------------------------------------------------------------------------------- /resources/views/livewire/user/edit.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 |
7 | {{ $errors->first('user.name') }} 8 |
9 |
10 | {{ trans('cruds.user.fields.name_helper') }} 11 |
12 |
13 |
14 | 15 | 16 |
17 | {{ $errors->first('user.email') }} 18 |
19 |
20 | {{ trans('cruds.user.fields.email_helper') }} 21 |
22 |
23 |
24 | 25 | 26 |
27 | {{ $errors->first('user.password') }} 28 |
29 |
30 | {{ trans('cruds.user.fields.password_helper') }} 31 |
32 |
33 |
34 | 35 | 36 |
37 | {{ $errors->first('roles') }} 38 |
39 |
40 | {{ trans('cruds.user.fields.roles_helper') }} 41 |
42 |
43 | 44 |
45 | 48 | 49 | {{ trans('global.cancel') }} 50 | 51 |
52 |
-------------------------------------------------------------------------------- /resources/views/vendor/livewire/simple-tailwind.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @if($paginator->hasPages()) 3 | 30 | @endif 31 |
-------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | false]); 16 | 17 | Route::group(['prefix' => 'admin', 'as' => 'admin.', 'middleware' => ['auth']], function () { 18 | Route::get('/', [HomeController::class, 'index'])->name('home'); 19 | 20 | // Permissions 21 | Route::resource('permissions', PermissionController::class, ['except' => ['store', 'update', 'destroy']]); 22 | 23 | // Roles 24 | Route::resource('roles', RoleController::class, ['except' => ['store', 'update', 'destroy']]); 25 | 26 | // Users 27 | Route::resource('users', UserController::class, ['except' => ['store', 'update', 'destroy']]); 28 | 29 | // Contact Company 30 | Route::resource('contact-companies', ContactCompanyController::class, ['except' => ['store', 'update', 'destroy']]); 31 | 32 | // Contact Contacts 33 | Route::resource('contact-contacts', ContactContactController::class, ['except' => ['store', 'update', 'destroy']]); 34 | 35 | // Transactions 36 | Route::resource('transactions', TransactionController::class, ['except' => ['store', 'update', 'destroy']]); 37 | }); 38 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const colors = require('tailwindcss/colors') 2 | 3 | module.exports = { 4 | purge: { 5 | enabled: true, 6 | content: ['./resources/views/**/*.blade.php'], 7 | options: { 8 | whitelist: [] 9 | } 10 | }, 11 | theme: { 12 | extend: { 13 | colors: { 14 | indigo: colors.indigo, 15 | rose: colors.rose, 16 | blueGray: colors.blueGray, 17 | lightBlue: colors.lightBlue 18 | }, 19 | minHeight: { 20 | 'screen-75': '75vh' 21 | }, 22 | fontSize: { 23 | '55': '55rem' 24 | }, 25 | opacity: { 26 | '80': '.8' 27 | }, 28 | zIndex: { 29 | '2': 2, 30 | '3': 3 31 | }, 32 | inset: { 33 | '-100': '-100%', 34 | '-225-px': '-225px', 35 | '-160-px': '-160px', 36 | '-150-px': '-150px', 37 | '-94-px': '-94px', 38 | '-50-px': '-50px', 39 | '-29-px': '-29px', 40 | '-20-px': '-20px', 41 | '25-px': '25px', 42 | '40-px': '40px', 43 | '95-px': '95px', 44 | '145-px': '145px', 45 | '195-px': '195px', 46 | '210-px': '210px', 47 | '260-px': '260px' 48 | }, 49 | height: { 50 | '95-px': '95px', 51 | '70-px': '70px', 52 | '350-px': '350px', 53 | '500-px': '500px', 54 | '600-px': '600px' 55 | }, 56 | maxHeight: { 57 | '860-px': '860px' 58 | }, 59 | maxWidth: { 60 | '100-px': '100px', 61 | '120-px': '120px', 62 | '150-px': '150px', 63 | '180-px': '180px', 64 | '200-px': '200px', 65 | '210-px': '210px', 66 | '580-px': '580px' 67 | }, 68 | minWidth: { 69 | '140-px': '140px', 70 | '48': '12rem' 71 | }, 72 | backgroundSize: { 73 | full: '100$' 74 | } 75 | } 76 | }, 77 | variants: [ 78 | 'responsive', 79 | 'group-hover', 80 | 'focus-within', 81 | 'first', 82 | 'last', 83 | 'odd', 84 | 'even', 85 | 'hover', 86 | 'focus', 87 | 'active', 88 | 'visited', 89 | 'disabled' 90 | ], 91 | plugins: [require('@tailwindcss/forms')] 92 | } 93 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel applications. By default, we are compiling the CSS 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .postCss('resources/css/app.css', 'public/css', [ 16 | require("tailwindcss") 17 | ]); 18 | --------------------------------------------------------------------------------