├── .chipperci.yml ├── .editorconfig ├── .env.example ├── .gitattributes ├── .github └── workflows │ ├── larastan.yaml │ ├── laravel.yaml │ └── update-assets.yaml ├── .gitignore ├── .styleci.yml ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── AuthenticatedSessionController.php │ │ │ ├── ConfirmablePasswordController.php │ │ │ ├── EmailVerificationNotificationController.php │ │ │ ├── EmailVerificationPromptController.php │ │ │ ├── NewPasswordController.php │ │ │ ├── PasswordResetLinkController.php │ │ │ ├── RegisteredUserController.php │ │ │ └── VerifyEmailController.php │ │ └── Controller.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ └── Auth │ │ └── LoginRequest.php ├── Jobs │ └── SleepTask.php ├── Models │ ├── Address.php │ ├── Book.php │ ├── BookPurchase.php │ ├── Captain.php │ ├── Category.php │ ├── Comment.php │ ├── Company.php │ ├── Dock.php │ ├── Employee.php │ ├── Flight.php │ ├── Invoice.php │ ├── InvoiceItem.php │ ├── Link.php │ ├── Passport.php │ ├── People.php │ ├── Photo.php │ ├── Podcast.php │ ├── Post.php │ ├── Profile.php │ ├── Project.php │ ├── Role.php │ ├── Sail.php │ ├── Ship.php │ ├── Snippet.php │ ├── Subscriber.php │ ├── Tag.php │ ├── Taggable.php │ ├── User.php │ └── Video.php ├── Nova │ ├── Actions │ │ ├── AddComment.php │ │ ├── BatchableSleep.php │ │ ├── ChangeCreatedAt.php │ │ ├── ConvertPurchaseToGift.php │ │ ├── CreateUserProfile.php │ │ ├── DownloadLaravelLogo.php │ │ ├── FieldsAction.php │ │ ├── MarkAsActive.php │ │ ├── MarkAsInactive.php │ │ ├── PivotTouch.php │ │ ├── RedirectToGoogle.php │ │ ├── RememberTokenCopier.php │ │ ├── SendNotification.php │ │ ├── Sleep.php │ │ ├── StandaloneTask.php │ │ ├── Touch.php │ │ ├── TouchCommentable.php │ │ ├── TrackSelectedAction.php │ │ ├── UpdatePivotNotes.php │ │ └── UpdateRequiredPivotNotes.php │ ├── Address.php │ ├── Book.php │ ├── Captain.php │ ├── Category.php │ ├── Comment.php │ ├── Company.php │ ├── Dashboards │ │ ├── Main.php │ │ ├── Metrics │ │ │ ├── NewPosts.php │ │ │ ├── PostCount.php │ │ │ ├── PostCountByUser.php │ │ │ └── PostCountOverTime.php │ │ └── Posts.php │ ├── Dependents │ │ └── CompanyDescription.php │ ├── Dock.php │ ├── Employee.php │ ├── Fields │ │ └── BookPurchase.php │ ├── Filters │ │ ├── Created.php │ │ ├── SelectFirst.php │ │ ├── UserPost.php │ │ └── WithPosts.php │ ├── Flight.php │ ├── Invoice.php │ ├── InvoiceItem.php │ ├── Lenses │ │ ├── BookCatalogues.php │ │ ├── BookPurchases.php │ │ ├── PassthroughLens.php │ │ ├── PassthroughWithTrashedLens.php │ │ └── PostLens.php │ ├── Link.php │ ├── Metrics │ │ ├── ActiveUsers.php │ │ ├── BookPurchases.php │ │ ├── CommentCount.php │ │ ├── PostCount.php │ │ ├── PostCountByUser.php │ │ ├── PostCountOverTime.php │ │ └── UsersWithProfile.php │ ├── Notification.php │ ├── Passport.php │ ├── People.php │ ├── Photo.php │ ├── Podcast.php │ ├── Post.php │ ├── Profile.php │ ├── Project.php │ ├── Repeater │ │ ├── CountryVisit.php │ │ └── InvoiceItem.php │ ├── Resource.php │ ├── Role.php │ ├── Sail.php │ ├── Ship.php │ ├── Snippet.php │ ├── Subscriber.php │ ├── Tag.php │ ├── User.php │ └── Video.php ├── Policies │ ├── PostPolicy.php │ ├── ProfilePolicy.php │ ├── SubscriberPolicy.php │ ├── TagPolicy.php │ └── UserPolicy.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ ├── NovaServiceProvider.php │ └── RouteServiceProvider.php └── View │ └── Components │ ├── AppLayout.php │ └── GuestLayout.php ├── artisan ├── bin └── sync ├── bootstrap ├── app.php ├── cache │ └── .gitignore └── helpers.php ├── composer.json ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── nova.php ├── queue.php ├── scout.php ├── services.php ├── session.php ├── site.php └── view.php ├── database ├── .gitignore ├── factories │ ├── AddressFactory.php │ ├── BookFactory.php │ ├── CaptainFactory.php │ ├── CategoryFactory.php │ ├── CommentFactory.php │ ├── CompanyFactory.php │ ├── DockFactory.php │ ├── FlightFactory.php │ ├── InvoiceFactory.php │ ├── InvoiceItemFactory.php │ ├── LinkFactory.php │ ├── PassportFactory.php │ ├── PeopleFactory.php │ ├── PhotoFactory.php │ ├── PodcastFactory.php │ ├── PostFactory.php │ ├── ProfileFactory.php │ ├── ProjectFactory.php │ ├── RoleFactory.php │ ├── SailFactory.php │ ├── ShipFactory.php │ ├── SubscriberFactory.php │ ├── TagFactory.php │ ├── UserFactory.php │ └── VideoFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ ├── 2018_07_11_203835_create_posts_table.php │ ├── 2018_07_12_141824_create_roles_table.php │ ├── 2018_07_12_141825_create_role_user_table.php │ ├── 2018_07_12_152021_create_comments_table.php │ ├── 2018_07_12_163206_create_tags_table.php │ ├── 2018_07_12_171623_create_docks_table.php │ ├── 2018_07_12_171647_create_ships_table.php │ ├── 2018_07_12_205028_create_sails_table.php │ ├── 2018_07_12_212426_create_captains_table.php │ ├── 2018_07_13_154425_create_videos_table.php │ ├── 2018_07_15_171959_create_flights_table.php │ ├── 2018_07_16_180920_create_addresses_table.php │ ├── 2018_09_10_195222_create_invoices_table.php │ ├── 2018_09_10_195228_create_invoice_items_table.php │ ├── 2019_01_04_123038_create_links_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2020_10_16_011539_create_companies_table.php │ ├── 2020_10_31_005440_create_people_table.php │ ├── 2020_10_31_005653_create_employees_table.php │ ├── 2021_02_16_010222_create_books_table.php │ ├── 2021_02_16_010414_create_book_purchases_table.php │ ├── 2021_04_11_121829_create_profiles_table.php │ ├── 2021_04_15_102634_create_job_batches_table.php │ ├── 2021_05_23_121524_add_settings_to_users_table.php │ ├── 2021_06_18_070223_create_projects_table.php │ ├── 2021_09_22_064044_add_permissions_to_users_table.php │ ├── 2022_03_22_000736_create_subscribers_table.php │ ├── 2022_05_23_102425_create_passports_table.php │ ├── 2022_06_20_042418_create_photos_table.php │ ├── 2022_10_26_045232_create_project_user_table.php │ ├── 2022_11_21_044956_create_podcasts_table.php │ ├── 2023_05_01_111553_add_excerpt_to_posts_table.php │ ├── 2023_05_16_005225_create_flight_passports_table.php │ ├── 2023_05_28_052003_add_date_of_birth_to_people_table.php │ ├── 2023_06_12_062244_create_categories_table.php │ ├── 2023_06_15_113911_create_snippets_table.php │ └── 2023_09_04_070446_add_visits_to_passports_table.php └── seeders │ ├── BookTableSeeder.php │ ├── DatabaseSeeder.php │ ├── ProfileTableSeeder.php │ └── UserTableSeeder.php ├── lang ├── en.json └── vendor │ └── nova │ ├── en.json │ └── en │ └── validation.php ├── nova-components ├── CustomField │ ├── .gitignore │ ├── composer.json │ ├── dist │ │ ├── css │ │ │ └── field.css │ │ ├── js │ │ │ ├── field.js │ │ │ └── field.js.LICENSE.txt │ │ └── mix-manifest.json │ ├── nova.mix.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── resources │ │ ├── css │ │ │ └── field.css │ │ └── js │ │ │ ├── components │ │ │ ├── DetailField.vue │ │ │ ├── FormField.vue │ │ │ └── IndexField.vue │ │ │ └── field.js │ ├── src │ │ ├── CustomField.php │ │ └── FieldServiceProvider.php │ └── webpack.mix.js ├── IconsViewer │ ├── .gitignore │ ├── composer.json │ ├── dist │ │ ├── css │ │ │ └── tool.css │ │ ├── js │ │ │ └── tool.js │ │ └── mix-manifest.json │ ├── nova.mix.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── resources │ │ ├── css │ │ │ └── tool.css │ │ └── js │ │ │ ├── components │ │ │ ├── .gitkeep │ │ │ └── IconsCollectionCard.vue │ │ │ ├── pages │ │ │ └── Tool.vue │ │ │ └── tool.js │ ├── routes │ │ ├── api.php │ │ └── inertia.php │ ├── src │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ └── ViewerController.php │ │ │ └── Middleware │ │ │ │ └── Authorize.php │ │ ├── IconsViewer.php │ │ └── ToolServiceProvider.php │ ├── tailwind.config.js │ └── webpack.mix.js ├── RememberTokenCopier │ ├── .gitignore │ ├── composer.json │ ├── dist │ │ ├── js │ │ │ └── asset.js │ │ └── mix-manifest.json │ ├── nova.mix.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── resources │ │ └── js │ │ │ ├── asset.js │ │ │ └── components │ │ │ └── RememberTokenCopier.vue │ ├── src │ │ └── AssetServiceProvider.php │ └── webpack.mix.js ├── ResourceTool │ ├── .gitignore │ ├── composer.json │ ├── dist │ │ ├── js │ │ │ ├── tool.js │ │ │ └── tool.js.LICENSE.txt │ │ └── mix-manifest.json │ ├── nova.mix.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── resources │ │ └── js │ │ │ ├── components │ │ │ └── Tool.vue │ │ │ └── tool.js │ ├── src │ │ ├── ResourceTool.php │ │ └── ToolServiceProvider.php │ ├── tailwind.config.js │ └── webpack.mix.js └── SidebarTool │ ├── .gitignore │ ├── composer.json │ ├── dist │ ├── css │ │ └── tool.css │ ├── js │ │ ├── tool.js │ │ └── tool.js.LICENSE.txt │ └── mix-manifest.json │ ├── mix-manifest.json │ ├── nova.mix.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── resources │ ├── css │ │ └── tool.css │ ├── js │ │ ├── components │ │ │ └── Logo.vue │ │ ├── pages │ │ │ └── Tool.vue │ │ └── tool.js │ └── views │ │ └── navigation.blade.php │ ├── routes │ ├── api.php │ └── inertia.php │ ├── src │ ├── Http │ │ └── Middleware │ │ │ └── Authorize.php │ ├── SidebarTool.php │ └── ToolServiceProvider.php │ ├── tailwind.config.js │ ├── unique.js │ └── webpack.mix.js ├── package-lock.json ├── package.json ├── phpstan-baseline.neon ├── phpstan.neon.dist ├── phpunit.dusk.xml ├── phpunit.xml ├── pint.json ├── postcss.config.js ├── public ├── .htaccess ├── css │ ├── app.css │ └── nova.css ├── favicon.ico ├── index.php ├── js │ ├── app.js │ ├── app.js.LICENSE.txt │ └── nova.js ├── laravel-logo.png ├── mix-manifest.json └── robots.txt ├── resources ├── css │ ├── app.css │ └── nova.css ├── js │ ├── app.js │ ├── bootstrap.js │ └── nova.js └── views │ ├── auth │ ├── confirm-password.blade.php │ ├── forgot-password.blade.php │ ├── login.blade.php │ ├── register.blade.php │ ├── reset-password.blade.php │ └── verify-email.blade.php │ ├── components │ ├── application-logo.blade.php │ ├── auth-card.blade.php │ ├── auth-session-status.blade.php │ ├── auth-validation-errors.blade.php │ ├── button.blade.php │ ├── dropdown-link.blade.php │ ├── dropdown.blade.php │ ├── input.blade.php │ ├── label.blade.php │ ├── nav-link.blade.php │ └── responsive-nav-link.blade.php │ ├── dashboard.blade.php │ ├── layouts │ ├── app.blade.php │ ├── guest.blade.php │ └── navigation.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── auth.php ├── channels.php ├── console.php └── web.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── Browser │ ├── ActionFieldTest.php │ ├── ActionModalAbandonmentTest.php │ ├── AttachDuplicationTest.php │ ├── AttachPolymorphicTest.php │ ├── AttachResourceFormAbandonmentTest.php │ ├── AttachSoftDeletingTest.php │ ├── AttachTest.php │ ├── AttachWithDateTimeFieldTest.php │ ├── AuthenticatesUserTest.php │ ├── ComponentOverrideTest.php │ ├── CreateResourceFormAbandonmentTest.php │ ├── CreateTest.php │ ├── CreateWithBelongsToTest.php │ ├── CreateWithHasManyThroughTest.php │ ├── CreateWithHasOneTest.php │ ├── CreateWithInlineManyToManyRelationButtonTest.php │ ├── CreateWithInlineRelationButtonTest.php │ ├── CreateWithMorphToTest.php │ ├── CreateWithPolymorphicTest.php │ ├── CreateWithSoftDeletingBelongsToTest.php │ ├── CreateWithSoftDeletingMorphToTest.php │ ├── CustomAuthenticatesUserTest.php │ ├── CustomFieldTest.php │ ├── DashboardTest.php │ ├── DateFieldTest.php │ ├── DateTimeFieldTest.php │ ├── DependentActionFieldTest.php │ ├── DependentBelongsToFieldTest.php │ ├── DependentBelongsToManyFieldTest.php │ ├── DependentBooleanGroupFieldTest.php │ ├── DependentFieldTest.php │ ├── DependentMultiSelectFieldTest.php │ ├── DependentPivotFieldTest.php │ ├── DetailActionTest.php │ ├── DetailAuthorizationTest.php │ ├── DetailBelongsToFieldTest.php │ ├── DetailMorphToFieldTest.php │ ├── DetailTest.php │ ├── FileAttachTest.php │ ├── FileDeleteTest.php │ ├── FilterableBelongsToManyFieldTest.php │ ├── FilterableDateFieldTest.php │ ├── FilterableFieldTest.php │ ├── Fixtures │ │ ├── Document.pdf │ │ └── StardewTaylor.png │ ├── FormButtonTest.php │ ├── GlobalSearchTest.php │ ├── HasOneAuthorizationTest.php │ ├── HasOneRelationTest.php │ ├── ImpersonatesUserTest.php │ ├── IndexActionTest.php │ ├── IndexAuthorizationTest.php │ ├── IndexBelongsToFieldTest.php │ ├── IndexDeletionTest.php │ ├── IndexFilterTest.php │ ├── IndexMorphToFieldTest.php │ ├── IndexPreviewTest.php │ ├── IndexRelationTest.php │ ├── IndexSearchTest.php │ ├── IndexTest.php │ ├── InlineActionDropdownTest.php │ ├── InlineCreateResourceModalAbandonmentTest.php │ ├── KeyValueFieldTest.php │ ├── LensActionTest.php │ ├── LensFilterTest.php │ ├── LensSearchTest.php │ ├── LensTest.php │ ├── LensWithoutIDTest.php │ ├── MainMenuTest.php │ ├── ManyToManyActionResourceTest.php │ ├── MarkdownFieldTest.php │ ├── ModalTest.php │ ├── MorphOneRelationTest.php │ ├── NotificationTest.php │ ├── PaginationTest.php │ ├── PanelTest.php │ ├── PivotActionTest.php │ ├── PivotFileAttachTest.php │ ├── QueuedActionTest.php │ ├── RelationshipAuthorizationTest.php │ ├── RelationshipIndexAuthorizationTest.php │ ├── RemoveAttachedTest.php │ ├── RepeaterFieldTest.php │ ├── ReplicateTest.php │ ├── ResetPasswordTest.php │ ├── ResourceClickActionTest.php │ ├── ResourceTableSelectionTest.php │ ├── SearchableSelectTest.php │ ├── SoftDeletingDetailTest.php │ ├── SoftDeletingIndexTest.php │ ├── SoftDeletingLensTest.php │ ├── SoftDeletingRelationIndexTest.php │ ├── TagFieldTest.php │ ├── ToolAuthorizationTest.php │ ├── TrixFieldTest.php │ ├── UpdateAttachedPolymorphicTest.php │ ├── UpdateAttachedResourceFormAbandonmentTest.php │ ├── UpdateAttachedSoftDeletingTest.php │ ├── UpdateAttachedTest.php │ ├── UpdateAuthorizationTest.php │ ├── UpdateResourceFormAbandonmentTest.php │ ├── UpdateTest.php │ ├── UpdateWithBelongsToTest.php │ ├── UpdateWithMorphToTest.php │ ├── VisitPreviousPageRedirectionTest.php │ ├── assets │ │ └── component-override.js │ ├── console │ │ └── .gitignore │ ├── screenshots │ │ └── .gitignore │ └── source │ │ └── .gitignore ├── Concerns │ └── DatabaseTruncation.php ├── Controller │ └── NovaTest.php ├── CreatesApplication.php ├── DuskTestCase.php ├── Feature │ ├── ApplicationTest.php │ ├── AuthenticationTest.php │ ├── EmailVerificationTest.php │ ├── Http │ │ └── Requests │ │ │ └── NovaRequestTest.php │ ├── PasswordConfirmationTest.php │ ├── PasswordResetTest.php │ └── RegistrationTest.php ├── TestCase.php ├── Unit │ └── ExampleTest.php └── bootstrap.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] 15 | indent_style = space 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME="Nova Dusk Suite" 2 | APP_ENV=testing 3 | APP_KEY=base64:AMC8+wx6fXb1Hl6lDYI0tLpcU8KTJfawYydL2xbg318= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost:8000 6 | 7 | DUSK_WIDTH=1920 8 | DUSK_HEIGHT=1080 9 | 10 | LOG_CHANNEL=stack 11 | LOG_LEVEL=debug 12 | 13 | DB_CONNECTION=mysql 14 | DB_HOST=127.0.0.1 15 | DB_PORT=3306 16 | DB_DATABASE=nova_dusk 17 | DB_USERNAME=root 18 | DB_PASSWORD= 19 | 20 | BROADCAST_DRIVER=log 21 | CACHE_DRIVER=file 22 | FILESYSTEM_DISK=local 23 | SESSION_DRIVER=cookie 24 | SESSION_LIFETIME=120 25 | QUEUE_DRIVER=sync 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_DRIVER=log 32 | MAIL_HOST=smtp.mailtrap.io 33 | MAIL_PORT=2525 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS="hello@example.com" 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | ALGOLIA_APP_ID= 41 | ALGOLIA_SECRET= 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 | 51 | ASSET_URL=${APP_URL} 52 | MIX_ASSET_URL=${ASSET_URL} 53 | NOVA_APP_NAME="Nova Site" 54 | NOVA_LICENSE_KEY= 55 | SCOUT_DRIVER="database" 56 | -------------------------------------------------------------------------------- /.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.cache 9 | .phpunit.result.cache 10 | docker-compose.override.yml 11 | Homestead.json 12 | Homestead.yaml 13 | npm-debug.log 14 | yarn-error.log 15 | /.idea 16 | /.vscode 17 | /composer.lock 18 | 19 | .searchable 20 | .inline-create 21 | .disable-reordering 22 | .disable-breadcrumbs 23 | 24 | /public/vendor/nova/* 25 | /resources/views/vendor/nova/* 26 | !/nova-components* 27 | /nova 28 | /nova-*.zip 29 | 30 | /rr 31 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | version: 8.1 4 | 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nova Dusk Test Suite 2 | 3 | This is the Laravel Dusk testing suite for Laravel Nova. 4 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 16 | } 17 | 18 | /** 19 | * Register the commands for the application. 20 | */ 21 | protected function commands(): void 22 | { 23 | $this->load(__DIR__.'/Commands'); 24 | 25 | require base_path('routes/console.php'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $dontFlash = [ 16 | 'current_password', 17 | 'password', 18 | 'password_confirmation', 19 | ]; 20 | 21 | /** 22 | * Register the exception handling callbacks for the application. 23 | */ 24 | public function register(): void 25 | { 26 | $this->reportable(function (Throwable $e) { 27 | // 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationNotificationController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 20 | return redirect()->intended(RouteServiceProvider::HOME); 21 | } 22 | 23 | $request->user()->sendEmailVerificationNotification(); 24 | 25 | return back()->with('status', 'verification-link-sent'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationPromptController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail() 20 | ? redirect()->intended(RouteServiceProvider::HOME) 21 | : view('auth.verify-email'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerifyEmailController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 21 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 22 | } 23 | 24 | if ($request->user()->markEmailAsVerified()) { 25 | event(new Verified($request->user())); 26 | } 27 | 28 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : route('login'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 24 | return redirect(RouteServiceProvider::HOME); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts(): array 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/ValidateSignature.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 'fbclid', 16 | // 'utm_campaign', 17 | // 'utm_content', 18 | // 'utm_medium', 19 | // 'utm_source', 20 | // 'utm_term', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Jobs/SleepTask.php: -------------------------------------------------------------------------------- 1 | model = $model; 32 | } 33 | 34 | /** 35 | * Execute the job. 36 | * 37 | * @return void 38 | */ 39 | public function handle() 40 | { 41 | ray('Running '.__CLASS__.' on Model['.$this->model->getKey().']'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Models/Address.php: -------------------------------------------------------------------------------- 1 | 27 | */ 28 | protected $casts = [ 29 | 'purchased_at' => 'datetime', 30 | ]; 31 | 32 | /** 33 | * Perform any actions required after the model boots. 34 | * 35 | * @return void 36 | */ 37 | protected static function booted(): void 38 | { 39 | static::created(function ($model) { 40 | ray('created', $model); 41 | }); 42 | 43 | static::deleted(function ($model) { 44 | ray('deleted', $model); 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Models/Captain.php: -------------------------------------------------------------------------------- 1 | belongsToMany(Ship::class)->withPivot('notes', 'contract'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/Category.php: -------------------------------------------------------------------------------- 1 | hasMany(Category::class, 'parent_id', 'id'); 17 | } 18 | 19 | /** 20 | * Get the category's parent. 21 | * 22 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 23 | */ 24 | public function parent() 25 | { 26 | return $this->belongsTo(Category::class, 'parent_id', 'id'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Models/Comment.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 19 | } 20 | 21 | /** 22 | * Get all of the commentable models. 23 | * 24 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo 25 | */ 26 | public function commentable(): MorphTo 27 | { 28 | return $this->morphTo(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Models/Company.php: -------------------------------------------------------------------------------- 1 | morphOne(Photo::class, 'imageable'); 22 | } 23 | 24 | /** 25 | * Get all of the company's profiles. 26 | * 27 | * @return \Illuminate\Database\Eloquent\Relations\HasMany 28 | */ 29 | public function profiles(): HasMany 30 | { 31 | return $this->hasMany(Profile::class); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Models/Dock.php: -------------------------------------------------------------------------------- 1 | hasMany(Ship::class); 23 | } 24 | 25 | /** 26 | * Get all of the sails that belongs to the dock. 27 | * 28 | * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough 29 | */ 30 | public function sails(): HasManyThrough 31 | { 32 | return $this->hasManyThrough(Sail::class, Ship::class); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/Employee.php: -------------------------------------------------------------------------------- 1 | belongsTo(People::class); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/Flight.php: -------------------------------------------------------------------------------- 1 | belongsToMany(Passport::class, 'flight_passports') 18 | ->withTimestamps(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Models/Invoice.php: -------------------------------------------------------------------------------- 1 | hasMany(InvoiceItem::class); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/InvoiceItem.php: -------------------------------------------------------------------------------- 1 | belongsTo(Invoice::class); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/Link.php: -------------------------------------------------------------------------------- 1 | morphMany(Comment::class, 'commentable'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/Passport.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | protected $casts = [ 20 | 'visits' => 'json', 21 | ]; 22 | 23 | /** 24 | * Get the profile the passport is belongs to. 25 | * 26 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 27 | */ 28 | public function profile(): BelongsTo 29 | { 30 | return $this->belongsTo(Profile::class); 31 | } 32 | 33 | /** 34 | * Get all of the flights that belong to the passport. 35 | * 36 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany 37 | */ 38 | public function flights(): BelongsToMany 39 | { 40 | return $this->belongsToMany(Flight::class, 'flight_passports') 41 | ->withTimestamps(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Models/Photo.php: -------------------------------------------------------------------------------- 1 | morphTo(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/Podcast.php: -------------------------------------------------------------------------------- 1 | morphMany(Comment::class, 'commentable'); 22 | } 23 | 24 | /** 25 | * Get all of the tags for the post. 26 | * 27 | * @return \Illuminate\Database\Eloquent\Relations\MorphToMany 28 | */ 29 | public function tags(): MorphToMany 30 | { 31 | return $this->morphToMany(Tag::class, 'taggable')->withPivot('notes'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Models/Project.php: -------------------------------------------------------------------------------- 1 | belongsToMany(User::class)->withTimestamps(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/Role.php: -------------------------------------------------------------------------------- 1 | belongsToMany(User::class)->withPivot('notes'); 21 | } 22 | 23 | /** 24 | * Get the indexable data array for the model. 25 | * 26 | * @return array 27 | */ 28 | public function toSearchableArray() 29 | { 30 | return [ 31 | 'id' => $this->id, 32 | 'name' => $this->name, 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Models/Sail.php: -------------------------------------------------------------------------------- 1 | belongsTo(Ship::class); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/Snippet.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $fillable = [ 19 | 'name', 20 | 'email', 21 | 'password', 22 | ]; 23 | 24 | /** 25 | * The attributes that should be hidden for serialization. 26 | * 27 | * @var array 28 | */ 29 | protected $hidden = [ 30 | 'password', 31 | 'remember_token', 32 | ]; 33 | 34 | /** 35 | * The attributes that should be cast to native types. 36 | * 37 | * @var array 38 | */ 39 | protected $casts = [ 40 | 'meta' => 'json', 41 | ]; 42 | 43 | /** 44 | * Determine if the user can impersonate another user. 45 | * 46 | * @return bool 47 | */ 48 | public function canImpersonate(): bool 49 | { 50 | return false; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Models/Tag.php: -------------------------------------------------------------------------------- 1 | morphedByMany(Post::class, 'taggable')->withPivot('notes')->using(Taggable::class); 18 | } 19 | 20 | /** 21 | * Get all of the videos that are assigned this tag. 22 | * 23 | * @return \Illuminate\Database\Eloquent\Relations\MorphToMany 24 | */ 25 | public function videos(): MorphToMany 26 | { 27 | return $this->morphedByMany(Video::class, 'taggable'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Models/Taggable.php: -------------------------------------------------------------------------------- 1 | morphMany(Comment::class, 'commentable'); 22 | } 23 | 24 | /** 25 | * Get all of the tags for the post. 26 | * 27 | * @return \Illuminate\Database\Eloquent\Relations\MorphToMany 28 | */ 29 | public function tags(): MorphToMany 30 | { 31 | return $this->morphToMany(Tag::class, 'taggable')->withPivot('notes'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Nova/Actions/ConvertPurchaseToGift.php: -------------------------------------------------------------------------------- 1 | each(function ($model) { 22 | ray($model); 23 | // $model->pivot->type = 'purchase'; 24 | // $model->pivot->save(); 25 | }); 26 | } 27 | 28 | /** 29 | * Get the fields available on the action. 30 | * 31 | * @param \Laravel\Nova\Http\Requests\NovaRequest $request 32 | * @return array 33 | */ 34 | public function fields(NovaRequest $request) 35 | { 36 | return []; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Nova/Actions/DownloadLaravelLogo.php: -------------------------------------------------------------------------------- 1 | forceFill(['active' => true])->save(); 27 | } 28 | 29 | return null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Nova/Actions/MarkAsInactive.php: -------------------------------------------------------------------------------- 1 | forceFill(['active' => false])->save(); 26 | } 27 | 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Nova/Actions/PivotTouch.php: -------------------------------------------------------------------------------- 1 | each(function ($model) { 26 | $model->touch(); 27 | }); 28 | 29 | return null; 30 | } 31 | 32 | /** 33 | * Get the fields available on the action. 34 | * 35 | * @param \Laravel\Nova\Http\Requests\NovaRequest $request 36 | * @return array 37 | */ 38 | public function fields(NovaRequest $request) 39 | { 40 | return []; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Nova/Actions/RedirectToGoogle.php: -------------------------------------------------------------------------------- 1 | isStandalone()) { 27 | foreach ($models as $model) { 28 | $this->markAsFinished($model); 29 | } 30 | } 31 | 32 | return null; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Nova/Actions/Touch.php: -------------------------------------------------------------------------------- 1 | each(function ($model) { 26 | $model->touch(); 27 | }); 28 | 29 | return null; 30 | } 31 | 32 | /** 33 | * Get the fields available on the action. 34 | * 35 | * @param \Laravel\Nova\Http\Requests\NovaRequest $request 36 | * @return array 37 | */ 38 | public function fields(NovaRequest $request) 39 | { 40 | return []; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Nova/Actions/TrackSelectedAction.php: -------------------------------------------------------------------------------- 1 | trackSelectedResources('toggle'), 38 | Fields\Boolean::make('Toggle', 'toggle')->default(false), 39 | ]; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Nova/Dashboards/Main.php: -------------------------------------------------------------------------------- 1 | count($request, Post::class, 'user_id'); 21 | } 22 | 23 | /** 24 | * Determine for how many minutes the metric should be cached. 25 | * 26 | * @return \DateTimeInterface|\DateInterval|float|int|null 27 | */ 28 | public function cacheFor() 29 | { 30 | // return now()->addMinutes(5); 31 | } 32 | 33 | /** 34 | * Get the URI key for the metric. 35 | * 36 | * @return string 37 | */ 38 | public function uriKey(): string 39 | { 40 | return 'post-by-user'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Nova/Dependents/CompanyDescription.php: -------------------------------------------------------------------------------- 1 | name = $name; 26 | } 27 | 28 | /** 29 | * Handle dependent field. 30 | * 31 | * @param \Laravel\Nova\Fields\Field $field 32 | * @param \Laravel\Nova\Http\Requests\NovaRequest $request 33 | * @param \Laravel\Nova\Fields\FormData $formData 34 | * @return void 35 | */ 36 | public function __invoke(Field $field, NovaRequest $request, FormData $formData) 37 | { 38 | $name = $formData->get($this->name); 39 | 40 | if (! empty($name)) { 41 | $field->show(); 42 | } 43 | 44 | $field->default( 45 | ! in_array($name, ['Laravel LLC', 'Laravel Holdings Inc.', 'Tailwind Labs Inc']) 46 | ? "{$name}'s Description" 47 | : '' 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/Nova/Filters/Created.php: -------------------------------------------------------------------------------- 1 | whereBetween($query->qualifyColumn('created_at'), [$value->startOfDay(), $value->endOfDay()]); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Nova/Filters/UserPost.php: -------------------------------------------------------------------------------- 1 | when($value['has-attachment'] === true, function ($query) { 21 | $query->whereNotNull($query->qualifyColumn('attachment')); 22 | }); 23 | } 24 | 25 | /** 26 | * Get the filter's available options. 27 | * 28 | * @param \Laravel\Nova\Http\Requests\NovaRequest $request 29 | * @return array 30 | */ 31 | public function options(NovaRequest $request): array 32 | { 33 | return [ 34 | 'Has Attachment' => 'has-attachment', 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Nova/Metrics/ActiveUsers.php: -------------------------------------------------------------------------------- 1 | count($request, User::class, function ($query) { 20 | return $query->where('active', '=', 1); 21 | }); 22 | } 23 | 24 | /** 25 | * Determine for how many minutes the metric should be cached. 26 | * 27 | * @return \DateTimeInterface|\DateInterval|float|int|null 28 | */ 29 | public function cacheFor() 30 | { 31 | // return now()->addMinutes(5); 32 | } 33 | 34 | /** 35 | * Get the URI key for the metric. 36 | * 37 | * @return string 38 | */ 39 | public function uriKey() 40 | { 41 | return 'active-users'; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Nova/Metrics/PostCountByUser.php: -------------------------------------------------------------------------------- 1 | count($request, Post::class, 'user_id'); 20 | } 21 | 22 | /** 23 | * Determine for how many minutes the metric should be cached. 24 | * 25 | * @return \DateTimeInterface|\DateInterval|float|int|null 26 | */ 27 | public function cacheFor() 28 | { 29 | // return now()->addMinutes(5); 30 | } 31 | 32 | /** 33 | * Get the URI key for the metric. 34 | * 35 | * @return string 36 | */ 37 | public function uriKey() 38 | { 39 | return 'post-by-user'; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Nova/Metrics/UsersWithProfile.php: -------------------------------------------------------------------------------- 1 | count($request, User::class, function ($query) { 20 | return $query->has('profile'); 21 | }); 22 | } 23 | 24 | /** 25 | * Determine for how many minutes the metric should be cached. 26 | * 27 | * @return \DateTimeInterface|\DateInterval|float|int|null 28 | */ 29 | public function cacheFor() 30 | { 31 | // return now()->addMinutes(5); 32 | } 33 | 34 | /** 35 | * Get the URI key for the metric. 36 | * 37 | * @return string 38 | */ 39 | public function uriKey() 40 | { 41 | return 'users-with-profile'; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Nova/Repeater/CountryVisit.php: -------------------------------------------------------------------------------- 1 | resolveUsing(function ($value) { 25 | return ! is_null($value) ? Carbon::parse($value) : null; 26 | }), 27 | Date::make('Leave') 28 | ->resolveUsing(function ($value) { 29 | return ! is_null($value) ? Carbon::parse($value) : null; 30 | }), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Nova/Repeater/InvoiceItem.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | public static $model = \App\Models\InvoiceItem::class; 20 | 21 | /** 22 | * Get the fields displayed by the repeatable. 23 | * 24 | * @param \Laravel\Nova\Http\Requests\NovaRequest $request 25 | * @return array 26 | */ 27 | public function fields(NovaRequest $request) 28 | { 29 | return [ 30 | ID::hidden(), 31 | 32 | Number::make('Quantity')->rules('numeric'), 33 | Text::make('Description')->rules('string'), 34 | Currency::make('Price')->rules('numeric')->asMinorUnits(), 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | protected $policies = [ 17 | 'App\Models\Post' => 'App\Policies\PostPolicy', 18 | 'App\Models\Profile' => 'App\Policies\ProfilePolicy', 19 | 'App\Models\Subscriber' => 'App\Policies\SubscriberPolicy', 20 | 'App\Models\Tag' => 'App\Policies\TagPolicy', 21 | 'App\Models\User' => 'App\Policies\UserPolicy', 22 | ]; 23 | 24 | /** 25 | * Register any authentication / authorization services. 26 | * 27 | * @return void 28 | */ 29 | public function boot() 30 | { 31 | $this->registerPolicies(); 32 | 33 | Password::defaults(function () { 34 | return Password::min(6); 35 | }); 36 | 37 | Gate::define('uploadFiles', function ($user) { 38 | return true; 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | > 15 | */ 16 | protected $listen = [ 17 | Registered::class => [ 18 | SendEmailVerificationNotification::class, 19 | ], 20 | ]; 21 | 22 | /** 23 | * Register any events for your application. 24 | * 25 | * @return void 26 | */ 27 | public function boot() 28 | { 29 | // 30 | } 31 | 32 | /** 33 | * Determine if events and listeners should be automatically discovered. 34 | * 35 | * @return bool 36 | */ 37 | public function shouldDiscoverEvents() 38 | { 39 | return false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/View/Components/AppLayout.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/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | 'scheme' => 'https', 22 | ], 23 | 24 | 'postmark' => [ 25 | 'token' => env('POSTMARK_TOKEN'), 26 | ], 27 | 28 | 'ses' => [ 29 | 'key' => env('AWS_ACCESS_KEY_ID'), 30 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 31 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/site.php: -------------------------------------------------------------------------------- 1 | [ 5 | /* 6 | * Set the default ordering for Nova Resources. 7 | * 8 | * Supported: "id", "created", "updated_at" or null (fallback to "id") 9 | */ 10 | 'orderings' => null, 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/AddressFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Address::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'address_line_1' => $this->faker->word(), 29 | 'address_line_2' => $this->faker->word(), 30 | 'city' => $this->faker->word(), 31 | 'state' => $this->faker->word(), 32 | 'postal_code' => $this->faker->word(), 33 | 'country' => $this->faker->word(), 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/factories/BookFactory.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | protected $model = Book::class; 20 | 21 | /** 22 | * Define the model's default state. 23 | * 24 | * @return array 25 | */ 26 | public function definition() 27 | { 28 | $name = $this->faker->name(); 29 | 30 | return [ 31 | 'title' => $name = $this->faker->name(), 32 | 'sku' => Str::slug($name), 33 | 'active' => true, 34 | ]; 35 | } 36 | 37 | /** 38 | * Indicate that the model's is in-active. 39 | * 40 | * @return \Illuminate\Database\Eloquent\Factories\Factory 41 | */ 42 | public function inactive() 43 | { 44 | return $this->state(function (array $attributes) { 45 | return [ 46 | 'active' => false, 47 | ]; 48 | }); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /database/factories/CaptainFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Captain::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->name(), 29 | 'photo' => '', 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/factories/CategoryFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Category::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->name(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/CompanyFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Company::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->name(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/DockFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Dock::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->word(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/FlightFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Flight::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->word(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/InvoiceFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Invoice::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return []; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/factories/InvoiceItemFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = InvoiceItem::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'invoice_id' => InvoiceFactory::new(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/LinkFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Link::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'title' => $this->faker->word(), 29 | 'url' => $this->faker->url(), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/factories/PeopleFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = People::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->name(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/PodcastFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Podcast::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'title' => $this->faker->word(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/PostFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Post::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'user_id' => UserFactory::new(), 29 | 'title' => $this->faker->word(), 30 | 'body' => $this->faker->words(10, true), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/factories/ProfileFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Profile::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'user_id' => UserFactory::new(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/ProjectFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Project::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->word(), 29 | 'type' => $this->faker->randomElement(['product', 'service']), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/factories/RoleFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Role::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->word(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/SailFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Sail::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'ship_id' => ShipFactory::new(), 29 | 'inches' => random_int(50, 100), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/factories/ShipFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Ship::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'dock_id' => DockFactory::new(), 29 | 'name' => $this->faker->word(), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/factories/SubscriberFactory.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | protected $model = Subscriber::class; 20 | 21 | /** 22 | * Define the model's default state. 23 | * 24 | * @return array 25 | */ 26 | public function definition() 27 | { 28 | return [ 29 | 'name' => $this->faker->name(), 30 | 'email' => $this->faker->unique()->safeEmail(), 31 | 'email_verified_at' => now(), 32 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 33 | 'remember_token' => Str::random(10), 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/factories/TagFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Tag::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'name' => $this->faker->word(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/VideoFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $model = Video::class; 19 | 20 | /** 21 | * Define the model's default state. 22 | * 23 | * @return array 24 | */ 25 | public function definition() 26 | { 27 | return [ 28 | 'title' => $this->faker->word(), 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('email')->unique(); 18 | $table->timestamp('email_verified_at')->nullable(); 19 | $table->string('password'); 20 | $table->boolean('active')->default(false); 21 | $table->string('blocked_from', 1000)->default('{}'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('users'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('email')->primary(); 16 | $table->string('token'); 17 | $table->timestamp('created_at')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('password_reset_tokens'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2018_07_11_203835_create_posts_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id')->index(); 19 | $table->string('title'); 20 | $table->longText('body'); 21 | $table->string('attachment')->nullable(); 22 | $table->boolean('active')->default(false); 23 | $table->json('meta')->nullable(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('posts'); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_141824_create_roles_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('roles'); 31 | Schema::dropIfExists('role_user'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_141825_create_role_user_table.php: -------------------------------------------------------------------------------- 1 | foreignId('role_id'); 18 | $table->foreignId('user_id'); 19 | $table->string('notes')->nullable(); 20 | 21 | $table->index(['role_id', 'user_id']); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('role_user'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_152021_create_comments_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id')->nullable(); 19 | $table->morphs('commentable'); 20 | $table->string('body'); 21 | $table->string('attachment')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('comments'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_163206_create_tags_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | }); 21 | 22 | Schema::create('taggables', function (Blueprint $table) { 23 | $table->foreignId('tag_id'); 24 | $table->foreignId('taggable_id'); 25 | $table->string('taggable_type'); 26 | $table->string('notes')->nullable(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('tags'); 38 | Schema::dropIfExists('taggables'); 39 | } 40 | }; 41 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_171623_create_docks_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('color')->nullable(); 20 | $table->boolean('active')->default(false); 21 | $table->timestamps(); 22 | $table->softDeletes(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('docks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_171647_create_ships_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('dock_id')->index(); 19 | $table->string('name'); 20 | $table->boolean('active')->default(false); 21 | $table->timestamp('departed_at')->nullable(); 22 | $table->timestamps(); 23 | $table->softDeletes(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('ships'); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_205028_create_sails_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->nullable(); 19 | $table->foreignId('ship_id')->index(); 20 | $table->integer('inches'); 21 | $table->string('slug')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('sails'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2018_07_12_212426_create_captains_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('photo')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | 23 | Schema::create('captain_ship', function (Blueprint $table) { 24 | $table->foreignId('captain_id'); 25 | $table->foreignId('ship_id'); 26 | $table->string('notes')->nullable(); 27 | $table->string('contract')->nullable(); 28 | 29 | $table->index(['captain_id', 'ship_id']); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('captains'); 41 | Schema::dropIfExists('captain_ship'); 42 | } 43 | }; 44 | -------------------------------------------------------------------------------- /database/migrations/2018_07_13_154425_create_videos_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('title'); 19 | $table->timestamps(); 20 | $table->softDeletes(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('videos'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2018_07_15_171959_create_flights_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('flights'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2018_07_16_180920_create_addresses_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('address_line_1'); 19 | $table->string('address_line_2')->nullable(); 20 | $table->string('city'); 21 | $table->string('state'); 22 | $table->string('postal_code'); 23 | $table->string('country'); 24 | $table->timestamps(); 25 | $table->softDeletes(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('addresses'); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /database/migrations/2018_09_10_195222_create_invoices_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::dropIfExists('invoices'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /database/migrations/2018_09_10_195228_create_invoice_items_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('invoice_id'); 19 | $table->unsignedInteger('quantity')->nullable(); 20 | $table->string('description')->nullable(); 21 | $table->unsignedInteger('price')->nullable(); 22 | $table->timestamps(); 23 | $table->softDeletes(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('invoice_items'); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /database/migrations/2019_01_04_123038_create_links_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('title'); 19 | $table->string('url'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('links'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('uuid')->unique(); 17 | $table->text('connection'); 18 | $table->text('queue'); 19 | $table->longText('payload'); 20 | $table->longText('exception'); 21 | $table->timestamp('failed_at')->useCurrent(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('failed_jobs'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->morphs('tokenable'); 17 | $table->string('name'); 18 | $table->string('token', 64)->unique(); 19 | $table->text('abilities')->nullable(); 20 | $table->timestamp('last_used_at')->nullable(); 21 | $table->timestamp('expires_at')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('personal_access_tokens'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2020_10_16_011539_create_companies_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('country')->nullable(); 20 | $table->longText('description')->nullable(); 21 | $table->timestamps(); 22 | $table->softDeletes(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('companies'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2020_10_31_005440_create_people_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('people'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2020_10_31_005653_create_employees_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('attendance'); 19 | $table->foreignId('people_id'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('employees'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2021_02_16_010222_create_books_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('sku')->unique(); 19 | $table->string('title'); 20 | $table->longText('description')->nullable(); 21 | $table->boolean('active')->default(0); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('books'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2021_02_16_010414_create_book_purchases_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('book_id'); 19 | $table->foreignId('user_id'); 20 | $table->unsignedInteger('price'); 21 | $table->string('type')->default('personal'); 22 | $table->dateTime('purchased_at')->nullable(); 23 | $table->timestamps(); 24 | //$table->softDeletes(); 25 | 26 | $table->index(['book_id', 'user_id']); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('book_purchases'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2021_04_11_121829_create_profiles_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id')->unique(); 19 | $table->foreignId('company_id')->index()->nullable(); 20 | 21 | $table->string('github_url')->nullable(); 22 | $table->string('twitter_url')->nullable(); 23 | 24 | $table->string('timezone')->nullable(); 25 | $table->json('languages')->nullable(); 26 | $table->json('interests')->nullable(); 27 | 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('profiles'); 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /database/migrations/2021_04_15_102634_create_job_batches_table.php: -------------------------------------------------------------------------------- 1 | string('id')->primary(); 18 | $table->string('name'); 19 | $table->integer('total_jobs'); 20 | $table->integer('pending_jobs'); 21 | $table->integer('failed_jobs'); 22 | $table->text('failed_job_ids'); 23 | $table->mediumText('options')->nullable(); 24 | $table->integer('cancelled_at')->nullable(); 25 | $table->integer('created_at'); 26 | $table->integer('finished_at')->nullable(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('job_batches'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2021_05_23_121524_add_settings_to_users_table.php: -------------------------------------------------------------------------------- 1 | json('settings')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('users', function (Blueprint $table) { 29 | $table->dropColumn('settings'); 30 | }); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2021_06_18_070223_create_projects_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->text('description')->nullable(); 20 | $table->string('type')->default('service'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('projects'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/migrations/2021_09_22_064044_add_permissions_to_users_table.php: -------------------------------------------------------------------------------- 1 | json('permissions')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('users', function (Blueprint $table) { 29 | $table->dropColumn('permissions'); 30 | }); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2022_03_22_000736_create_subscribers_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->json('meta')->nullable(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('subscribers'); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /database/migrations/2022_05_23_102425_create_passports_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('profile_id')->index()->nullable(); 19 | $table->string('value'); 20 | $table->string('country'); 21 | $table->timestamps(); 22 | 23 | $table->unique(['value', 'country']); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('passports'); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /database/migrations/2022_06_20_042418_create_photos_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('url')->nullable(); 19 | $table->string('filename')->nullable(); 20 | $table->nullableMorphs('imageable'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('photos'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/migrations/2022_10_26_045232_create_project_user_table.php: -------------------------------------------------------------------------------- 1 | foreignId('project_id'); 18 | $table->foreignId('user_id'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('project_user'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2022_11_21_044956_create_podcasts_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('title'); 19 | $table->string('filename')->nullable(); 20 | $table->timestamps(); 21 | $table->softDeletes(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('podcasts'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/migrations/2023_05_01_111553_add_excerpt_to_posts_table.php: -------------------------------------------------------------------------------- 1 | text('excerpt')->after('title')->nullable()->default(null); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('posts', function (Blueprint $table) { 29 | $table->dropColumn('excerpt'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2023_05_16_005225_create_flight_passports_table.php: -------------------------------------------------------------------------------- 1 | foreignId('flight_id'); 18 | $table->foreignId('passport_id'); 19 | $table->timestamps(); 20 | 21 | $table->index(['flight_id', 'passport_id']); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('flight_passports'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/migrations/2023_05_28_052003_add_date_of_birth_to_people_table.php: -------------------------------------------------------------------------------- 1 | date('date_of_birth')->nullable()->after('name'); 16 | }); 17 | } 18 | 19 | /** 20 | * Reverse the migrations. 21 | */ 22 | public function down(): void 23 | { 24 | Schema::table('people', function (Blueprint $table) { 25 | $table->dropColumn('date_of_birth'); 26 | }); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2023_06_12_062244_create_categories_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | 19 | $table->string('name'); 20 | $table->foreignId('parent_id')->nullable(); 21 | 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down(): void 32 | { 33 | Schema::dropIfExists('categories'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2023_06_15_113911_create_snippets_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('language'); 19 | $table->longText('content'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('snippets'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2023_09_04_070446_add_visits_to_passports_table.php: -------------------------------------------------------------------------------- 1 | json('visits')->nullable()->after('country'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('passports', function (Blueprint $table) { 29 | $table->dropColumn('visits'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/seeders/BookTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'codehappy', 19 | 'title' => 'Laravel: Code Happy', 20 | 'active' => 1, 21 | ]); 22 | 23 | Book::forceCreate([ 24 | 'sku' => 'codebright', 25 | 'title' => 'Laravel: Code Bright', 26 | 'active' => 1, 27 | ]); 28 | 29 | Book::forceCreate([ 30 | 'sku' => 'laravel', 31 | 'title' => 'Laravel: From Apprentice To Artisan', 32 | 'active' => 1, 33 | ]); 34 | 35 | Book::forceCreate([ 36 | 'sku' => 'laravel-testing-decoded', 37 | 'title' => 'Laravel Testing Decoded', 38 | 'active' => 1, 39 | ]); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UserTableSeeder::class); 17 | $this->call(ProfileTableSeeder::class); 18 | $this->call(BookTableSeeder::class); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /database/seeders/ProfileTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 19 | 'github_url' => 'https://github.com/taylorotwell', 20 | 'twitter_url' => 'https://twitter.com/taylorotwell', 21 | ]); 22 | 23 | Profile::forceCreate([ 24 | 'user_id' => 2, 25 | 'github_url' => 'https://github.com/themsaid', 26 | 'twitter_url' => 'https://twitter.com/themsaid', 27 | ]); 28 | 29 | Profile::forceCreate([ 30 | 'user_id' => 3, 31 | 'github_url' => 'https://github.com/davidhemphill', 32 | 'twitter_url' => 'https://twitter.com/davidhemphill', 33 | ]); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/seeders/UserTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Taylor Otwell', 21 | 'email' => 'taylor@laravel.com', 22 | 'password' => $password, 23 | 'blocked_from' => [], 24 | ]); 25 | 26 | User::forceCreate([ 27 | 'name' => 'James Brooks', 28 | 'email' => 'james@laravel.com', 29 | 'password' => $password, 30 | 'blocked_from' => [], 31 | ]); 32 | 33 | User::forceCreate([ 34 | 'name' => 'David Hemphill', 35 | 'email' => 'david@laravel.com', 36 | 'password' => $password, 37 | 'blocked_from' => [], 38 | ]); 39 | 40 | User::forceCreate([ 41 | 'name' => 'Laravel Nova', 42 | 'email' => 'nova@laravel.com', 43 | 'password' => $password, 44 | 'blocked_from' => [], 45 | ]); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lang/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "The :attribute must contain at least one letter.": "The :attribute must contain at least one letter.", 3 | "The :attribute must contain at least one number.": "The :attribute must contain at least one number.", 4 | "The :attribute must contain at least one symbol.": "The :attribute must contain at least one symbol.", 5 | "The :attribute must contain at least one uppercase and one lowercase letter.": "The :attribute must contain at least one uppercase and one lowercase letter.", 6 | "The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute." 7 | } 8 | -------------------------------------------------------------------------------- /lang/vendor/nova/en/validation.php: -------------------------------------------------------------------------------- 1 | 'This :attribute is already attached.', 17 | 'relatable' => 'This :attribute may not be associated with this resource.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /nova-components/CustomField/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /vendor 3 | /node_modules 4 | composer.phar 5 | composer.lock 6 | phpunit.xml 7 | .DS_Store 8 | Thumbs.db 9 | -------------------------------------------------------------------------------- /nova-components/CustomField/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "otwell/custom-field", 3 | "description": "A Laravel Nova field.", 4 | "keywords": [ 5 | "laravel", 6 | "nova" 7 | ], 8 | "license": "MIT", 9 | "require": { 10 | "php": "^7.3|^8.0" 11 | }, 12 | "require-dev": { 13 | "laravel/nova": "*" 14 | }, 15 | "autoload": { 16 | "psr-4": { 17 | "Otwell\\CustomField\\": "src/" 18 | } 19 | }, 20 | "extra": { 21 | "laravel": { 22 | "providers": [ 23 | "Otwell\\CustomField\\FieldServiceProvider" 24 | ] 25 | } 26 | }, 27 | "config": { 28 | "sort-packages": true 29 | }, 30 | "repositories": [ 31 | { "type": "path", "url": "../../nova" } 32 | ], 33 | "minimum-stability": "dev", 34 | "prefer-stable": true 35 | } 36 | -------------------------------------------------------------------------------- /nova-components/CustomField/dist/css/field.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /nova-components/CustomField/dist/js/field.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * The buffer module from node.js, for the browser. 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | /*! 9 | * vuex v4.1.0 10 | * (c) 2022 Evan You 11 | * @license MIT 12 | */ 13 | 14 | /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ 15 | 16 | /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ 17 | -------------------------------------------------------------------------------- /nova-components/CustomField/dist/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/field.js": "/js/field.js", 3 | "/css/field.css": "/css/field.css" 4 | } 5 | -------------------------------------------------------------------------------- /nova-components/CustomField/nova.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix') 2 | const webpack = require('webpack') 3 | const path = require('path') 4 | 5 | class NovaExtension { 6 | name() { 7 | return 'nova-extension' 8 | } 9 | 10 | register(name) { 11 | this.name = name 12 | } 13 | 14 | webpackPlugins() { 15 | return new webpack.ProvidePlugin({ 16 | _: 'lodash', 17 | axios: 'axios', 18 | Errors: 'form-backend-validation' 19 | }) 20 | } 21 | 22 | webpackConfig(webpackConfig) { 23 | webpackConfig.externals = { 24 | vue: 'Vue' 25 | } 26 | 27 | webpackConfig.resolve.alias = { 28 | ...(webpackConfig.resolve.alias || {}), 29 | 'laravel-nova': path.join( 30 | __dirname, 31 | '../../vendor/laravel/nova/resources/js/mixins/packages.js' 32 | ), 33 | } 34 | 35 | webpackConfig.output = { 36 | uniqueName: this.name, 37 | } 38 | } 39 | } 40 | 41 | mix.extend('nova', new NovaExtension()) 42 | -------------------------------------------------------------------------------- /nova-components/CustomField/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run nova-install && npm run production", 10 | "production": "mix --production", 11 | "nova-install": "npm --prefix='../../vendor/laravel/nova' ci" 12 | }, 13 | "devDependencies": { 14 | "@vue/compiler-sfc": "^3.2.22", 15 | "form-backend-validation": "^2.3.3", 16 | "laravel-mix": "^6.0.41", 17 | "lodash": "^4.17.21", 18 | "postcss": "^8.4.31", 19 | "vue-loader": "^16.8.3" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /nova-components/CustomField/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {} 2 | -------------------------------------------------------------------------------- /nova-components/CustomField/resources/css/field.css: -------------------------------------------------------------------------------- 1 | /* Nova Tool CSS */ 2 | -------------------------------------------------------------------------------- /nova-components/CustomField/resources/js/components/DetailField.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /nova-components/CustomField/resources/js/components/FormField.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 47 | -------------------------------------------------------------------------------- /nova-components/CustomField/resources/js/components/IndexField.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | -------------------------------------------------------------------------------- /nova-components/CustomField/resources/js/field.js: -------------------------------------------------------------------------------- 1 | Nova.booting((Vue, store) => { 2 | Vue.component('index-custom-field', require('./components/IndexField').default); 3 | Vue.component('detail-custom-field', require('./components/DetailField').default); 4 | Vue.component('form-custom-field', require('./components/FormField').default); 5 | }) 6 | -------------------------------------------------------------------------------- /nova-components/CustomField/src/CustomField.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{ props.name }} ({{ props.icons.length }} icons) 4 | 5 |
6 | 11 | 16 | 17 |
18 |
19 | 20 | 21 | 27 | 28 | 33 | 34 | 39 | -------------------------------------------------------------------------------- /nova-components/IconsViewer/resources/js/pages/Tool.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 27 | 28 | 33 | -------------------------------------------------------------------------------- /nova-components/IconsViewer/resources/js/tool.js: -------------------------------------------------------------------------------- 1 | import Tool from './pages/Tool' 2 | 3 | Nova.booting((app, store) => { 4 | Nova.inertia('IconsViewer', Tool) 5 | }) 6 | -------------------------------------------------------------------------------- /nova-components/IconsViewer/routes/api.php: -------------------------------------------------------------------------------- 1 | first([$this, 'matchesTool']); 20 | 21 | return optional($tool)->authorize($request) ? $next($request) : abort(403); 22 | } 23 | 24 | /** 25 | * Determine whether this tool belongs to the package. 26 | * 27 | * @param \Laravel\Nova\Tool $tool 28 | * @return bool 29 | */ 30 | public function matchesTool($tool) 31 | { 32 | return $tool instanceof IconsViewer; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /nova-components/IconsViewer/src/IconsViewer.php: -------------------------------------------------------------------------------- 1 | { 4 | Nova.component('remember-token-copier', RememberTokenCopier) 5 | }) 6 | -------------------------------------------------------------------------------- /nova-components/RememberTokenCopier/resources/js/components/RememberTokenCopier.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 34 | -------------------------------------------------------------------------------- /nova-components/RememberTokenCopier/src/AssetServiceProvider.php: -------------------------------------------------------------------------------- 1 | 4 | * Copyright OpenJS Foundation and other contributors 5 | * Released under MIT license 6 | * Based on Underscore.js 1.8.3 7 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 8 | */ 9 | -------------------------------------------------------------------------------- /nova-components/ResourceTool/dist/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/tool.js": "/js/tool.js" 3 | } 4 | -------------------------------------------------------------------------------- /nova-components/ResourceTool/nova.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix') 2 | const webpack = require('webpack') 3 | const path = require('path') 4 | 5 | class NovaExtension { 6 | name() { 7 | return 'nova-extension' 8 | } 9 | 10 | register(name) { 11 | this.name = name 12 | } 13 | 14 | webpackPlugins() { 15 | return new webpack.ProvidePlugin({ 16 | _: 'lodash', 17 | axios: 'axios', 18 | Errors: 'form-backend-validation' 19 | }) 20 | } 21 | 22 | webpackRules() { 23 | return { 24 | test: /\.(postcss)$/, 25 | use: [ 26 | 'vue-style-loader', 27 | { loader: 'css-loader', options: { importLoaders: 1 } }, 28 | 'postcss-loader' 29 | ] 30 | } 31 | } 32 | 33 | webpackConfig(webpackConfig) { 34 | webpackConfig.externals = { 35 | vue: 'Vue' 36 | } 37 | 38 | webpackConfig.resolve.alias = { 39 | ...(webpackConfig.resolve.alias || {}), 40 | 'laravel-nova': path.join(__dirname, '../../vendor/laravel/nova/resources/js/mixins/packages.js'), 41 | } 42 | 43 | webpackConfig.output = { 44 | uniqueName: this.name, 45 | } 46 | } 47 | } 48 | 49 | mix.extend('nova', new NovaExtension()) 50 | -------------------------------------------------------------------------------- /nova-components/ResourceTool/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run nova-install && npm run production", 10 | "production": "mix --production", 11 | "nova-install": "npm --prefix='../../vendor/laravel/nova' ci" 12 | }, 13 | "devDependencies": { 14 | "@vue/compiler-sfc": "^3.2.22", 15 | "laravel-mix": "^6.0.41", 16 | "lodash": "^4.17.21", 17 | "postcss": "^8.4.31", 18 | "vue-loader": "^16.8.3" 19 | }, 20 | "dependencies": { 21 | "tailwindcss": "^2.0.4" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /nova-components/ResourceTool/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [require("tailwindcss"), require("autoprefixer")] 3 | }; 4 | -------------------------------------------------------------------------------- /nova-components/ResourceTool/resources/js/components/Tool.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 26 | 27 | 32 | -------------------------------------------------------------------------------- /nova-components/ResourceTool/resources/js/tool.js: -------------------------------------------------------------------------------- 1 | Nova.booting(function (app, store) { 2 | app.component('resource-tool', require('./components/Tool').default); 3 | app.component('detail-resource-tool', require('./components/Tool').default); 4 | }) 5 | -------------------------------------------------------------------------------- /nova-components/ResourceTool/src/ResourceTool.php: -------------------------------------------------------------------------------- 1 | 5 | * @license MIT 6 | */ 7 | 8 | /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ 9 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/dist/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/tool.js": "/js/tool.js", 3 | "/css/tool.css": "/css/tool.css" 4 | } 5 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/dist/js/tool.js": "/dist/js/tool.js", 3 | "/dist/css/tool.css": "/dist/css/tool.css" 4 | } -------------------------------------------------------------------------------- /nova-components/SidebarTool/nova.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix') 2 | const webpack = require('webpack') 3 | const path = require('path') 4 | 5 | class NovaExtension { 6 | name() { 7 | return 'nova-extension' 8 | } 9 | 10 | register(name) { 11 | this.name = name 12 | } 13 | 14 | webpackConfig(webpackConfig) { 15 | webpackConfig.externals = { 16 | vue: 'Vue' 17 | } 18 | 19 | webpackConfig.resolve.alias = { 20 | ...(webpackConfig.resolve.alias || {}), 21 | 'laravel-nova': path.join(__dirname, '../../vendor/laravel/nova/resources/js/mixins/packages.js'), 22 | } 23 | 24 | webpackConfig.output = { 25 | uniqueName: this.name, 26 | } 27 | } 28 | } 29 | 30 | mix.extend('nova', new NovaExtension()) 31 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run nova-install && npm run production", 10 | "production": "mix --production", 11 | "nova-install": "npm --prefix='../../vendor/laravel/nova' ci" 12 | }, 13 | "devDependencies": { 14 | "@vue/compiler-sfc": "^3.2.22", 15 | "laravel-mix": "^6.0.41", 16 | "postcss": "^8.4.31", 17 | "postcss-import": "^14.0.2", 18 | "vue-loader": "^16.8.3" 19 | }, 20 | "dependencies": { 21 | "axios": "^1.6.0", 22 | "tailwindcss": "^2.0.4" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {} 2 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/resources/css/tool.css: -------------------------------------------------------------------------------- 1 | /* Nova Tool CSS */ 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/resources/js/pages/Tool.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 33 | 34 | 37 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/resources/js/tool.js: -------------------------------------------------------------------------------- 1 | Nova.booting((app, store) => { 2 | Nova.inertia('SidebarTool', require('./pages/Tool').default) 3 | app.component('SidebarToolLogo', require('./components/Logo').default) 4 | }) 5 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/resources/views/navigation.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Sidebar Tool 5 | 6 | 7 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/routes/api.php: -------------------------------------------------------------------------------- 1 | user(); 10 | }); 11 | 12 | Route::get('/', function (Request $request) { 13 | return 'Hello World'; 14 | }); 15 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/routes/inertia.php: -------------------------------------------------------------------------------- 1 | filter(function ($tool) { 20 | return $tool instanceof SidebarTool; 21 | })->first(); 22 | 23 | if (is_null($tool)) { 24 | abort(404); 25 | } 26 | 27 | if (! $tool->authorize($request)) { 28 | abort(403); 29 | } 30 | 31 | return $next($request); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/src/SidebarTool.php: -------------------------------------------------------------------------------- 1 | path('sidebar-tool') 33 | ->icon('server'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: [ 3 | require('../../vendor/laravel/nova/tailwind.config.js') 4 | ], 5 | darkMode: 'class', // or 'media' or 'class' 6 | mode: 'jit', 7 | purge: ['./src/**/*.php', './resources/**/*.{js,vue,blade.php}'], 8 | }; 9 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/unique.js: -------------------------------------------------------------------------------- 1 | let postcss = require('postcss') 2 | let fs = require('fs') 3 | 4 | module.exports = (options = {}) => { 5 | let selectors = new Set() 6 | 7 | postcss.parse(fs.readFileSync(options.path)).walkRules(rule => { 8 | selectors.add(rule.selector) 9 | }) 10 | 11 | return { 12 | postcssPlugin: 'unique', 13 | 14 | Rule(rule) { 15 | if (selectors.has(rule.selector)) { 16 | rule.remove() 17 | } 18 | }, 19 | } 20 | } 21 | 22 | module.exports.postcss = true 23 | -------------------------------------------------------------------------------- /nova-components/SidebarTool/webpack.mix.js: -------------------------------------------------------------------------------- 1 | let mix = require('laravel-mix') 2 | let tailwindcss = require('tailwindcss') 3 | let postcssImport = require('postcss-import') 4 | let path = require('path') 5 | let unique = require('./unique') 6 | 7 | require('./nova.mix') 8 | 9 | mix 10 | .setPublicPath('dist') 11 | .js('resources/js/tool.js', 'js') 12 | .vue({ version: 3}) 13 | .postCss('resources/css/tool.css', 'css', [ 14 | postcssImport(), 15 | unique({ path: path.join(__dirname, '../../vendor/laravel/nova/public/app.css') }), 16 | tailwindcss('tailwind.config.js'), 17 | ]) 18 | .nova('otwell/sidebar-tool') 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production", 11 | "build-icons-viewer": "cd nova-components/IconsViewer && npm run dev", 12 | "build-icons-viewer-prod": "cd nova-components/IconsViewer && npm run prod" 13 | }, 14 | "devDependencies": { 15 | "@tailwindcss/forms": "^0.2.1", 16 | "@vue/compiler-sfc": "^3.2.37", 17 | "alpinejs": "^2.7.3", 18 | "autoprefixer": "^10.1.0", 19 | "axios": "^1.7", 20 | "cross-env": "^7.0", 21 | "laravel-mix": "^6.0.6", 22 | "lodash": "^4.17.19", 23 | "postcss": "^8.4.31", 24 | "postcss-import": "^12.0.1", 25 | "tailwindcss": "^2.0.2", 26 | "vue-loader": "^16.8.3" 27 | } 28 | } -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | includes: 2 | - ./vendor/larastan/larastan/extension.neon 3 | - ./phpstan-baseline.neon 4 | 5 | parameters: 6 | 7 | paths: 8 | - app 9 | - database 10 | - nova-components/CustomField/src 11 | - nova-components/IconsViewer/src 12 | - nova-components/RememberTokenCopier/src 13 | - nova-components/ResourceTool/src 14 | - nova-components/SidebarTool/src 15 | 16 | # The level 9 is the highest level 17 | level: 6 18 | 19 | ignoreErrors: 20 | - '#Access to an undefined property Laravel\\Nova\\Fields\\(ActionFields|FormData)#' 21 | - '#Call to an undefined method Illuminate\\Database\\Eloquent\\[a-zA-Z\\\<\>]+::(withTrashed|onlyTrashed|trashed)\(\)#' 22 | 23 | excludePaths: 24 | - app/Http/Controllers/Auth/*.php 25 | 26 | checkMissingIterableValueType: false 27 | noUnnecessaryCollectionCall: false 28 | checkModelProperties: false 29 | checkGenericClassInNonGenericObjectType: false 30 | -------------------------------------------------------------------------------- /pint.json: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "laravel", 3 | "exclude": [ 4 | "tests/Browser" 5 | ], 6 | "rules": { 7 | "no_superfluous_phpdoc_tags": false 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /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/css/nova.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laravel/nova-dusk-suite/8ded9c507c5ff4132f650e0c95f847440ff9c7d8/public/favicon.ico -------------------------------------------------------------------------------- /public/js/app.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * The buffer module from node.js, for the browser. 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ 9 | 10 | /** 11 | * @license 12 | * Lodash 13 | * Copyright OpenJS Foundation and other contributors 14 | * Released under MIT license 15 | * Based on Underscore.js 1.8.3 16 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 17 | */ 18 | -------------------------------------------------------------------------------- /public/js/nova.js: -------------------------------------------------------------------------------- 1 | Nova.booting((function(e){Nova.request().interceptors.response.use((function(e){return console.dir({response:e}),e}),(function(e){return console.dir({error:e}),Promise.reject(e)}))})); -------------------------------------------------------------------------------- /public/laravel-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laravel/nova-dusk-suite/8ded9c507c5ff4132f650e0c95f847440ff9c7d8/public/laravel-logo.png -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/js/nova.js": "/js/nova.js", 4 | "/css/nova.css": "/css/nova.css", 5 | "/css/app.css": "/css/app.css" 6 | } 7 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss/base'; 2 | @import 'tailwindcss/components'; 3 | @import 'tailwindcss/utilities'; 4 | -------------------------------------------------------------------------------- /resources/css/nova.css: -------------------------------------------------------------------------------- 1 | /* Nova */ 2 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | 3 | require('alpinejs'); 4 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | window.axios = require('axios'); 10 | 11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 12 | 13 | /** 14 | * Echo exposes an expressive API for subscribing to channels and listening 15 | * for events that are broadcast by Laravel. Echo and event broadcasting 16 | * allows your team to easily build robust real-time web applications. 17 | */ 18 | 19 | // import Echo from 'laravel-echo'; 20 | 21 | // window.Pusher = require('pusher-js'); 22 | 23 | // window.Echo = new Echo({ 24 | // broadcaster: 'pusher', 25 | // key: process.env.MIX_PUSHER_APP_KEY, 26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 27 | // forceTLS: true 28 | // }); 29 | -------------------------------------------------------------------------------- /resources/js/nova.js: -------------------------------------------------------------------------------- 1 | Nova.booting((app) => { 2 | Nova.request().interceptors.response.use( 3 | response => { 4 | console.dir({ response }) 5 | 6 | return response 7 | }, 8 | error => { 9 | console.dir({ error }) 10 | 11 | return Promise.reject(error) 12 | } 13 | ) 14 | }) 15 | -------------------------------------------------------------------------------- /resources/views/components/auth-card.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ $logo }} 4 |
5 | 6 |
7 | {{ $slot }} 8 |
9 |
10 | -------------------------------------------------------------------------------- /resources/views/components/auth-session-status.blade.php: -------------------------------------------------------------------------------- 1 | @props(['status']) 2 | 3 | @if ($status) 4 |
merge(['class' => 'font-medium text-sm text-green-600']) }}> 5 | {{ $status }} 6 |
7 | @endif 8 | -------------------------------------------------------------------------------- /resources/views/components/auth-validation-errors.blade.php: -------------------------------------------------------------------------------- 1 | @props(['errors']) 2 | 3 | @if ($errors->any()) 4 |
5 |
6 | {{ __('Whoops! Something went wrong.') }} 7 |
8 | 9 |
    10 | @foreach ($errors->all() as $error) 11 |
  • {{ $error }}
  • 12 | @endforeach 13 |
14 |
15 | @endif 16 | -------------------------------------------------------------------------------- /resources/views/components/button.blade.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /resources/views/components/dropdown-link.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out']) }}>{{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/components/input.blade.php: -------------------------------------------------------------------------------- 1 | @props(['disabled' => false]) 2 | 3 | merge(['class' => 'rounded-md shadow-sm border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}> 4 | -------------------------------------------------------------------------------- /resources/views/components/label.blade.php: -------------------------------------------------------------------------------- 1 | @props(['value']) 2 | 3 | 6 | -------------------------------------------------------------------------------- /resources/views/components/nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out' 6 | : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/components/responsive-nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out' 6 | : 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/dashboard.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | {{ __('Dashboard') }} 5 |

6 |
7 | 8 |
9 |
10 |
11 |
12 | You're logged in! 13 |
14 |
15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ config('app.name', 'Laravel') }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | @include('layouts.navigation') 22 | 23 | 24 |
25 |
26 | {{ $header }} 27 |
28 |
29 | 30 | 31 |
32 | {{ $slot }} 33 |
34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /resources/views/layouts/guest.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ config('app.name', 'Laravel') }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | {{ $slot }} 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /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 defaultTheme = require('tailwindcss/defaultTheme'); 2 | 3 | module.exports = { 4 | purge: [ 5 | './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', 6 | './storage/framework/views/*.php', 7 | './resources/views/**/*.blade.php', 8 | ], 9 | 10 | theme: { 11 | extend: { 12 | fontFamily: { 13 | sans: ['Nunito', ...defaultTheme.fontFamily.sans], 14 | }, 15 | }, 16 | }, 17 | 18 | variants: { 19 | extend: { 20 | opacity: ['disabled'], 21 | }, 22 | }, 23 | 24 | plugins: [require('@tailwindcss/forms')], 25 | }; 26 | -------------------------------------------------------------------------------- /tests/Browser/ComponentOverrideTest.php: -------------------------------------------------------------------------------- 1 | beforeServingApplication(function ($app) { 19 | Nova::serving(function (ServingNova $event) { 20 | Nova::script('component-override', __DIR__.'/assets/component-override.js'); 21 | }); 22 | }); 23 | 24 | $this->browse(function (Browser $browser) { 25 | $browser->loginAs(1) 26 | ->visit(new Create('users')) 27 | ->click('.custom-help-component') 28 | ->waitForDialog() 29 | ->assertDialogOpened('HelpText was overriden using component-override.js') 30 | ->dismissDialog(); 31 | 32 | $browser->blank(); 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/Browser/CreateWithInlineManyToManyRelationButtonTest.php: -------------------------------------------------------------------------------- 1 | defineApplicationStates(['inline-create']); 14 | 15 | $this->browse(function (Browser $browser) { 16 | $browser->loginAs(1) 17 | ->visit(new Attach('users', 1, 'roles')) 18 | ->runInlineCreate('roles', function ($browser) { 19 | $browser->waitForText('Create Role') 20 | ->type('@name', 'Manager'); 21 | }) 22 | ->waitForText('The role was created!') 23 | ->pause(500) 24 | ->assertSee('Manager') 25 | ->create() 26 | ->waitForText('The resource was attached!'); 27 | 28 | $browser->blank(); 29 | }); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/Browser/DependentBelongsToManyFieldTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) { 16 | $browser->loginAs(1) 17 | ->visit(new Attach('users', 1, 'books', 'personalBooks')) 18 | ->within(new FormComponent(), function ($browser) { 19 | $browser->assertSee('Attach Book') 20 | ->assertSeeIn('p.help-text', 'Price starts from $0-$99') 21 | ->within(new RelationSelectControlComponent('attachable'), function ($browser) { 22 | $browser->select('', 1); 23 | })->pause(500) 24 | ->assertSeeIn('p.help-text', 'Price starts from $10-$199'); 25 | }); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/Browser/Fixtures/Document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laravel/nova-dusk-suite/8ded9c507c5ff4132f650e0c95f847440ff9c7d8/tests/Browser/Fixtures/Document.pdf -------------------------------------------------------------------------------- /tests/Browser/Fixtures/StardewTaylor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laravel/nova-dusk-suite/8ded9c507c5ff4132f650e0c95f847440ff9c7d8/tests/Browser/Fixtures/StardewTaylor.png -------------------------------------------------------------------------------- /tests/Browser/IndexBelongsToFieldTest.php: -------------------------------------------------------------------------------- 1 | posts()->save(PostFactory::new()->make()); 19 | 20 | $this->browse(function (Browser $browser) use ($user) { 21 | $browser->loginAs($user) 22 | ->visit(new Index('posts')) 23 | ->within(new IndexComponent('posts'), function ($browser) use ($user) { 24 | $browser->waitForTable() 25 | ->clickLink($user->name); 26 | }) 27 | ->on(new Detail('users', $user->id)) 28 | ->assertSeeIn('h1', 'User Details'); 29 | 30 | $browser->blank(); 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Browser/PanelTest.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | $this->browse(function (Browser $browser) use ($address) { 18 | $browser->loginAs(1) 19 | ->visit(new Detail('addresses', $address->id)) 20 | ->assertSee('More Address Details'); 21 | 22 | $browser->blank(); 23 | }); 24 | } 25 | 26 | public function test_fields_can_be_placed_into_edit_panels() 27 | { 28 | $address = AddressFactory::new()->create(); 29 | 30 | $this->browse(function (Browser $browser) use ($address) { 31 | $browser->loginAs(1) 32 | ->visit(new Update('addresses', $address->id)) 33 | ->assertSee('More Address Details'); 34 | 35 | $browser->blank(); 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Browser/QueuedActionTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) { 15 | $browser->loginAs(1) 16 | ->visit(new Detail('users', 1)) 17 | ->runAction('sleep') 18 | ->within(new IndexComponent('action-events'), function ($browser) { 19 | $browser->waitForTable() 20 | ->scrollIntoView('') 21 | ->assertSee('Sleep') 22 | ->assertSee('FINISHED'); 23 | }); 24 | 25 | $browser->blank(); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/Browser/ResetPasswordTest.php: -------------------------------------------------------------------------------- 1 | app->make('auth.password.broker'); 16 | 17 | $token = $passwordBroker->createToken($user); 18 | 19 | $this->browse(function (Browser $browser) use ($user, $token) { 20 | $browser->visit("/nova/password/reset/{$token}?email={$user->email}") 21 | ->type('password', 'password!!') 22 | ->type('password_confirmation', 'password!!') 23 | ->clickAndWaitForReload('button[type="submit"]') 24 | ->assertPathIs(Nova::url('/dashboards/main')); 25 | 26 | $browser->blank(); 27 | 28 | $user->refresh(); 29 | $this->assertTrue(password_verify('password!!', $user->password)); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/Browser/SearchableSelectTest.php: -------------------------------------------------------------------------------- 1 | defineApplicationStates('searchable'); 15 | 16 | $this->browse(function (Browser $browser) { 17 | $user = User::with('profile')->find(1); 18 | 19 | $this->assertNotSame('America/Chicago', $user->profile->timezone); 20 | 21 | $browser->loginAs($user) 22 | ->visit(new Update('profiles', $user->id)) 23 | ->searchAndSelectFirstResult('timezone', 'America/Chicago') 24 | ->update() 25 | ->waitForText('The profile was updated!'); 26 | 27 | $browser->blank(); 28 | 29 | $user->refresh(); 30 | 31 | $this->assertSame('America/Chicago', $user->profile->timezone); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/Browser/TrixFieldTest.php: -------------------------------------------------------------------------------- 1 | Code Happy is the best-selling title for learning version 3 of the Laravel PHP Framework.'; 15 | 16 | Book::whereKey(1)->update([ 17 | 'description' => $description, 18 | ]); 19 | 20 | $this->browse(function (Browser $browser) use ($description) { 21 | $browser->loginAs(1) 22 | ->visit(new Update('books', 1)) 23 | ->type('@sku', 'codehappy-revised') 24 | ->update() 25 | ->waitForText('The book was updated!'); 26 | 27 | $browser->blank(); 28 | 29 | $this->assertDatabaseHas('books', [ 30 | 'sku' => 'codehappy-revised', 31 | 'title' => 'Laravel: Code Happy', 32 | 'description' => $description, 33 | ]); 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Browser/UpdateAuthorizationTest.php: -------------------------------------------------------------------------------- 1 | create(); 16 | User::find(1)->shouldBlockFrom('post.update.'.$post->id); 17 | 18 | $this->browse(function (Browser $browser) use ($post) { 19 | $browser->loginAs(1) 20 | ->visit(new Page("/resources/posts/{$post->id}/edit")) 21 | ->assertForbidden(); 22 | 23 | $browser->blank(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/Browser/assets/component-override.js: -------------------------------------------------------------------------------- 1 | Nova.booting(app => { 2 | app.component('HelpText', { 3 | template: ` 4 |

5 | 6 |

7 | `, 8 | methods: { 9 | displayWarning() { 10 | window.alert('HelpText was overriden using component-override.js') 11 | }, 12 | }, 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /tests/Browser/console/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Browser/screenshots/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Browser/source/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Concerns/DatabaseTruncation.php: -------------------------------------------------------------------------------- 1 | artisan('migrate:fresh', [ 18 | '--seed' => true, 19 | ]); 20 | } 21 | } 22 | } else { 23 | trait DatabaseTruncation 24 | { 25 | use \Illuminate\Foundation\Testing\DatabaseTruncation; 26 | 27 | protected $seed = true; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/Controller/NovaTest.php: -------------------------------------------------------------------------------- 1 | create(); 14 | 15 | $response = $this->actingAs($user) 16 | ->get('/nova'); 17 | 18 | $response->assertStatus(200); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ApplicationTest.php: -------------------------------------------------------------------------------- 1 | assertTrue($this->app->providerIsLoaded(\Inertia\ServiceProvider::class)); 26 | $this->assertTrue($this->app->providerIsLoaded(\Laravel\Nova\NovaServiceProvider::class)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/Feature/AuthenticationTest.php: -------------------------------------------------------------------------------- 1 | get('/login'); 17 | 18 | $response->assertStatus(200); 19 | } 20 | 21 | public function test_users_can_authenticate_using_the_login_screen() 22 | { 23 | $user = User::factory()->create(); 24 | 25 | $response = $this->post('/login', [ 26 | 'email' => $user->email, 27 | 'password' => 'password', 28 | ]); 29 | 30 | $this->assertAuthenticated(); 31 | $response->assertRedirect(RouteServiceProvider::HOME); 32 | } 33 | 34 | public function test_users_can_not_authenticate_with_invalid_password() 35 | { 36 | $user = User::factory()->create(); 37 | 38 | $this->post('/login', [ 39 | 'email' => $user->email, 40 | 'password' => 'wrong-password', 41 | ]); 42 | 43 | $this->assertGuest(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tests/Feature/PasswordConfirmationTest.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | $response = $this->actingAs($user)->get('/confirm-password'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | 22 | public function test_password_can_be_confirmed() 23 | { 24 | $user = User::factory()->create(); 25 | 26 | $response = $this->actingAs($user)->post('/confirm-password', [ 27 | 'password' => 'password', 28 | ]); 29 | 30 | $response->assertRedirect(); 31 | $response->assertSessionHasNoErrors(); 32 | } 33 | 34 | public function test_password_is_not_confirmed_with_invalid_password() 35 | { 36 | $user = User::factory()->create(); 37 | 38 | $response = $this->actingAs($user)->post('/confirm-password', [ 39 | 'password' => 'wrong-password', 40 | ]); 41 | 42 | $response->assertSessionHasErrors(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /tests/Feature/RegistrationTest.php: -------------------------------------------------------------------------------- 1 | get('/register'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | 20 | public function test_new_users_can_register() 21 | { 22 | $response = $this->post('/register', [ 23 | 'name' => 'Test User', 24 | 'email' => 'test@example.com', 25 | 'password' => 'password', 26 | 'password_confirmation' => 'password', 27 | ]); 28 | 29 | $this->assertAuthenticated(); 30 | $response->assertRedirect(RouteServiceProvider::HOME); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 |