├── .env.example ├── .gitignore ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ └── ExampleController.php │ │ ├── Controller.php │ │ └── Frontend │ │ │ └── PageDisplayController.php │ ├── Kernel.php │ ├── Livewire │ │ ├── ContactForm.php │ │ └── ExampleLivewireComponent.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Models │ └── User.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── Twill │ └── Capsules │ ├── Base │ ├── BaseCapsuleServiceProvider.php │ ├── FrontEndModel.php │ ├── Model.php │ ├── Scopes │ │ ├── MustBePublished.php │ │ ├── MustHaveTranslation.php │ │ ├── OrderByPosition.php │ │ └── Scope.php │ ├── config.php │ └── helpers.php │ ├── ContactFormSubmissions │ ├── ContactFormSubmissionsCapsuleServiceProvider.php │ ├── Events │ │ └── NewContactFormSubmissionEvent.php │ ├── Http │ │ ├── Controllers │ │ │ └── ContactFormSubmissionController.php │ │ └── Requests │ │ │ └── ContactFormSubmissionRequest.php │ ├── Listeners │ │ └── SendEmailForNewContactSubmissionListener.php │ ├── Mail │ │ └── ContactFormSubmissionMail.php │ ├── Models │ │ └── ContactFormSubmission.php │ ├── Repositories │ │ └── ContactFormSubmissionRepository.php │ ├── database │ │ ├── migrations │ │ │ └── 2021_10_18_122641_create_contact_form_submissions_tables.php │ │ └── seeds │ │ │ └── DatabaseSeeder.php │ ├── readme.md │ ├── resources │ │ └── views │ │ │ ├── admin │ │ │ └── form.blade.php │ │ │ └── emails │ │ │ └── contact-form-submission.blade.php │ └── routes │ │ └── admin.php │ ├── Menus │ ├── Http │ │ ├── Controllers │ │ │ └── MenuController.php │ │ └── Requests │ │ │ └── MenuRequest.php │ ├── Models │ │ ├── Menu.php │ │ ├── MenuItem.php │ │ ├── MenuItemTranslation.php │ │ ├── MenuRevision.php │ │ ├── MenuSlug.php │ │ └── MenuTranslation.php │ ├── Repositories │ │ ├── MenuItemRepository.php │ │ └── MenuRepository.php │ ├── database │ │ └── migrations │ │ │ ├── 2021_11_01_093402_create_menus_tables.php │ │ │ └── 2021_11_01_093602_create_menu_items_tables.php │ ├── resources │ │ └── views │ │ │ └── admin │ │ │ ├── form.blade.php │ │ │ └── repeaters │ │ │ └── menu_item.blade.php │ └── routes │ │ └── admin.php │ └── Pages │ ├── Http │ ├── Controllers │ │ └── PageController.php │ └── Requests │ │ └── PageRequest.php │ ├── Models │ ├── Page.php │ ├── PageRevision.php │ ├── PageSlug.php │ └── PageTranslation.php │ ├── Repositories │ └── PageRepository.php │ ├── config.php │ ├── database │ ├── migrations │ │ └── 2021_10_18_122525_create_pages_tables.php │ └── seeds │ │ └── DatabaseSeeder.php │ ├── helpers.php │ ├── resources │ └── views │ │ └── admin │ │ └── form.blade.php │ └── routes │ └── admin.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── laravellocalization.php ├── livewire.php ├── logging.php ├── mail.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php ├── translatable.php ├── twill-navigation.php ├── twill.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ └── 2019_12_14_000001_create_personal_access_tokens_table.php └── seeders │ └── DatabaseSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── assets │ ├── admin │ │ ├── css │ │ │ ├── chunk-common.4ff8ead5.css │ │ │ ├── chunk-vendors.e0f3ef32.css │ │ │ ├── main-buckets.4476e8eb.css │ │ │ ├── main-dashboard.cc2042d4.css │ │ │ ├── main-form.6cf823f7.css │ │ │ └── main-listing.5d4dfb4c.css │ │ ├── fonts │ │ │ ├── Inter-Bold.34356f6b.woff2 │ │ │ ├── Inter-Bold.61c493e3.woff │ │ │ ├── Inter-BoldItalic.57acb479.woff2 │ │ │ ├── Inter-BoldItalic.6fbcf86a.woff │ │ │ ├── Inter-Italic.35cf8109.woff │ │ │ ├── Inter-Italic.381444ec.woff2 │ │ │ ├── Inter-Medium.2e5e0884.woff2 │ │ │ ├── Inter-Medium.c09fb389.woff │ │ │ ├── Inter-MediumItalic.7a7fd735.woff2 │ │ │ ├── Inter-MediumItalic.ad6e093c.woff │ │ │ ├── Inter-Regular.aebfbb3c.woff │ │ │ └── Inter-Regular.bffaed79.woff2 │ │ ├── js │ │ │ ├── chunk-common.42c86e43.js │ │ │ ├── chunk-vendors.91e7f646.js │ │ │ ├── main-buckets.243ca8f6.js │ │ │ ├── main-dashboard.ea2a5736.js │ │ │ ├── main-form.06223e5b.js │ │ │ ├── main-free.75070804.js │ │ │ └── main-listing.ce326d1a.js │ │ └── twill-manifest.json │ ├── blobs.svg │ ├── blurry-gradient-haikei.svg │ ├── intersect.svg │ ├── logo.svg │ ├── store-desk-helping.jpg │ └── streamline.svg ├── css │ └── app.css ├── favicon.ico ├── index.php ├── js │ ├── app.js │ └── app.js.LICENSE.txt ├── mix-manifest.json ├── robots.txt ├── vendor │ └── livewire │ │ ├── livewire.js │ │ ├── livewire.js.map │ │ └── manifest.json └── web.config ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── admin │ ├── blocks │ │ ├── contact-form.blade.php │ │ ├── faq-list.blade.php │ │ ├── simple-text.blade.php │ │ └── text-with-image.blade.php │ ├── example-page.blade.php │ ├── repeaters │ │ ├── faq-item.blade.php │ │ └── menu_item.blade.php │ └── settings │ │ ├── footer.blade.php │ │ └── pages.blade.php │ ├── components │ ├── footer.blade.php │ ├── site │ │ ├── menu.blade.php │ │ └── menu │ │ │ ├── item.blade.php │ │ │ └── mobile-item.blade.php │ └── success-alert.blade.php │ ├── emails │ └── contact-form-submission.blade.php │ ├── frontend │ └── page.blade.php │ ├── livewire │ ├── contact-form.blade.php │ └── example-livewire-component.blade.php │ └── site │ ├── blocks │ ├── contact-form.blade.php │ ├── faq-item.blade.php │ ├── faq-list.blade.php │ ├── simple-text.blade.php │ └── text-with-image.blade.php │ └── layouts │ └── block.blade.php ├── routes ├── admin.php ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | ADMIN_APP_URL=http://localhost 7 | ADMIN_APP_PATH=admin 8 | 9 | LOG_CHANNEL=stack 10 | LOG_LEVEL=debug 11 | 12 | DB_CONNECTION=mysql 13 | DB_HOST=127.0.0.1 14 | DB_PORT=3306 15 | DB_DATABASE=demo 16 | DB_USERNAME=root 17 | DB_PASSWORD=root 18 | 19 | BROADCAST_DRIVER=log 20 | CACHE_DRIVER=redis 21 | FILESYSTEM_DRIVER=local 22 | QUEUE_CONNECTION=sync 23 | SESSION_DRIVER=redis 24 | SESSION_LIFETIME=120 25 | 26 | MEMCACHED_HOST=127.0.0.1 27 | 28 | REDIS_HOST=127.0.0.1 29 | REDIS_PASSWORD=null 30 | REDIS_PORT=6379 31 | 32 | MAIL_MAILER=smtp 33 | MAIL_HOST=mailhog 34 | MAIL_PORT=1025 35 | MAIL_USERNAME=null 36 | MAIL_PASSWORD=null 37 | MAIL_ENCRYPTION=null 38 | MAIL_FROM_ADDRESS=rob@webisolv.com 39 | MAIL_FROM_NAME="${APP_NAME}" 40 | 41 | AWS_ACCESS_KEY_ID= 42 | AWS_SECRET_ACCESS_KEY= 43 | AWS_DEFAULT_REGION=us-east-1 44 | AWS_BUCKET= 45 | AWS_USE_PATH_STYLE_ENDPOINT=false 46 | 47 | PUSHER_APP_ID= 48 | PUSHER_APP_KEY= 49 | PUSHER_APP_SECRET= 50 | PUSHER_APP_CLUSTER=mt1 51 | 52 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 53 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 54 | 55 | # twill 56 | MEDIA_LIBRARY_ENDPOINT_TYPE=local 57 | MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\Glide 58 | 59 | FILE_LIBRARY_ENDPOINT_TYPE=local 60 | FILE_LIBRARY_LOCAL_PATH=uploads/ 61 | FILE_LIBRARY_FILESIZE_LIMIT=150M 62 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | docker-compose.override.yml 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | /.idea 15 | /.vscode 16 | backups 17 | .phpstorm.meta.php 18 | _ide_helper.php 19 | _ide_helper_models.php 20 | .idea 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Starter kit 2 | 3 | This starter kit is used by [Webisolv](https://webisolv.com) to bootstrap new projects. 4 | 5 | It comes with: 6 | 7 | - [Twill](https://twill.io) 8 | - [mcamara/laravel-localization](https://github.com/mcamara/laravel-localization) 9 | - [Livewire](https://laravel-livewire.com) 10 | - [TailwindCss](https://tailwindcss.com) 11 | 12 | In addition to the packages this repository may contain: 13 | 14 | - A basic page content type 15 | - A basic menu content type 16 | - A basic contact form content type 17 | - Some blocks (contact form (twill), menu) 18 | - A settings page for selecting the home page 19 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 38 | // 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/ExampleController.php: -------------------------------------------------------------------------------- 1 | pageRepository = $pageRepository; 23 | $this->settingRepository = $settingRepository; 24 | } 25 | 26 | public function displayPage(string $slug): View 27 | { 28 | /** @var Page $page */ 29 | $page = $this->pageRepository->forSlug($slug); 30 | 31 | abort_if(!$page || !$page->translation->active, 404); 32 | 33 | $this->seo->setTitle($page->getAttribute('title') . ' | ' . Config::get('twill.seo.site_title')); 34 | 35 | return view('frontend.page', ['item' => $page]); 36 | } 37 | 38 | public function landingPage(): View 39 | { 40 | $page = Page::find($this->settingRepository->byKey('homepage', 'pages')); 41 | 42 | abort_if(!$page || !$page->translation->active, 404); 43 | 44 | $this->seo->setTitle($page->translation->title . ' | ' . Config::get('twill.seo.site_title')); 45 | 46 | return view('frontend.page', ['item' => $page]); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 44 | 'throttle:api', 45 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 46 | ], 47 | ]; 48 | 49 | /** 50 | * The application's route middleware. 51 | * 52 | * These middleware may be assigned to groups or used individually. 53 | * 54 | * @var array 55 | */ 56 | protected $routeMiddleware = [ 57 | 'auth' => \App\Http\Middleware\Authenticate::class, 58 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 63 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 64 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 65 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 66 | 'localize' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes::class, 67 | 'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class, 68 | 'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class, 69 | 'localeCookieRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class, 70 | ]; 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Livewire/ContactForm.php: -------------------------------------------------------------------------------- 1 | 'required|string', 19 | 'contactForm.message' => 'required|string', 20 | 'contactForm.email' => 'required|email', 21 | 'contactForm.phone_number' => 'required|string', 22 | ]; 23 | 24 | public function mount(?ContactFormSubmission $contactForm): void 25 | { 26 | $this->contactForm = $contactForm; 27 | } 28 | 29 | public function save(): void 30 | { 31 | $this->validate(); 32 | 33 | $this->contactForm->save(); 34 | 35 | $this->saved = true; 36 | } 37 | 38 | public function render(): View 39 | { 40 | return view('livewire.contact-form'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Livewire/ExampleLivewireComponent.php: -------------------------------------------------------------------------------- 1 | count++; 14 | } 15 | 16 | public function render() 17 | { 18 | return view('livewire.example-livewire-component'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | 'datetime', 46 | ]; 47 | } 48 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 41 | 42 | $this->routes(function () { 43 | Route::prefix('api') 44 | ->middleware('api') 45 | ->namespace($this->namespace) 46 | ->group(base_path('routes/api.php')); 47 | 48 | Route::middleware('web') 49 | ->namespace($this->namespace) 50 | ->group(base_path('routes/web.php')); 51 | }); 52 | } 53 | 54 | /** 55 | * Configure the rate limiters for the application. 56 | * 57 | * @return void 58 | */ 59 | protected function configureRateLimiting() 60 | { 61 | RateLimiter::for('api', function (Request $request) { 62 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 63 | }); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Base/BaseCapsuleServiceProvider.php: -------------------------------------------------------------------------------- 1 | isPublishable($model)) { 20 | $builder->where("{$model->getTable()}.published", true); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Base/Scopes/MustHaveTranslation.php: -------------------------------------------------------------------------------- 1 | isTranslatable($model)) { 20 | $builder->withActiveTranslations(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Base/Scopes/OrderByPosition.php: -------------------------------------------------------------------------------- 1 | orderBy("{$model->getTable()}.position", 'asc'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Base/Scopes/Scope.php: -------------------------------------------------------------------------------- 1 | getFillable())->contains('published'); 13 | } 14 | 15 | public function isTranslatable(Model $model): bool 16 | { 17 | return filled($model->translatedAttributes ?? null); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Base/config.php: -------------------------------------------------------------------------------- 1 | [ 4 | 'files' => [__DIR__ . '/helpers.php'], 5 | ], 6 | ]; 7 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Base/helpers.php: -------------------------------------------------------------------------------- 1 | route()) { 10 | return Str::startsWith(optional(request()->route())->getName(), ['front.', 'api.']); 11 | } 12 | return false; 13 | } 14 | } 15 | 16 | if (!function_exists('repository')) { 17 | function repository($moduleName) 18 | { 19 | $repository = 'App\\Repositories\\' . ucfirst(Str::singular($moduleName)) . 'Repository'; 20 | 21 | if (class_exists($repository)) { 22 | return app($repository); 23 | } 24 | 25 | $repository = 26 | 'App\\Twill\\Capsules\\' . 27 | ucfirst(Str::plural($moduleName)) . 28 | '\Repositories\\' . 29 | ucfirst(Str::singular($moduleName)) . 30 | 'Repository'; 31 | 32 | return app($repository); 33 | } 34 | } 35 | 36 | if (!function_exists('get_config')) { 37 | function get_config(string $key, string $group): ?string 38 | { 39 | return app(SettingRepository::class)->byKey($key, $group); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/ContactFormSubmissionsCapsuleServiceProvider.php: -------------------------------------------------------------------------------- 1 | submission = $submission; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/Http/Controllers/ContactFormSubmissionController.php: -------------------------------------------------------------------------------- 1 | false 13 | ]; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/Http/Requests/ContactFormSubmissionRequest.php: -------------------------------------------------------------------------------- 1 | send( 15 | new ContactFormSubmissionMail($event->submission) 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/Mail/ContactFormSubmissionMail.php: -------------------------------------------------------------------------------- 1 | submission = $submission; 15 | } 16 | 17 | public function build() 18 | { 19 | $this->subject($this->submission->title); 20 | return $this->view('emails.contact-form-submission', [ 21 | 'title' => $this->submission->title, 22 | 'content' => $this->submission->message, 23 | 'email' => $this->submission->email, 24 | 'phone_number' => $this->submission->phone_number, 25 | ]); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/Models/ContactFormSubmission.php: -------------------------------------------------------------------------------- 1 | NewContactFormSubmissionEvent::class 19 | ]; 20 | 21 | protected $fillable = [ 22 | 'published', 23 | 'title', 24 | 'description', 25 | ]; 26 | 27 | public $mediasParams = [ 28 | 'cover' => [ 29 | 'default' => [ 30 | [ 31 | 'name' => 'default', 32 | 'ratio' => 16 / 9, 33 | ], 34 | ], 35 | 'mobile' => [ 36 | [ 37 | 'name' => 'mobile', 38 | 'ratio' => 1, 39 | ], 40 | ], 41 | 'flexible' => [ 42 | [ 43 | 'name' => 'free', 44 | 'ratio' => 0, 45 | ], 46 | [ 47 | 'name' => 'landscape', 48 | 'ratio' => 16 / 9, 49 | ], 50 | [ 51 | 'name' => 'portrait', 52 | 'ratio' => 3 / 5, 53 | ], 54 | ], 55 | ], 56 | ]; 57 | } 58 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/Repositories/ContactFormSubmissionRepository.php: -------------------------------------------------------------------------------- 1 | model = $model; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/database/migrations/2021_10_18_122641_create_contact_form_submissions_tables.php: -------------------------------------------------------------------------------- 1 | string('title', 200)->nullable(); 16 | $table->string('message', 200)->nullable(); 17 | $table->string('email', 200)->nullable(); 18 | $table->string('phone_number', 200)->nullable(); 19 | }); 20 | } 21 | 22 | public function down(): void 23 | { 24 | Schema::dropIfExists('contact_form_submissions'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(YourSeeder::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/readme.md: -------------------------------------------------------------------------------- 1 | After install setup the email to mail to via: 2 | 3 | `ContactFormSubmissionsCapsuleServiceProvider::setEmailTo('rob@harings.be');` 4 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/resources/views/admin/form.blade.php: -------------------------------------------------------------------------------- 1 | @extends('twill::layouts.form') 2 | 3 | @section('contentFields') 4 | @formField('input', [ 5 | 'name' => 'description', 6 | 'label' => 'Description', 7 | 'maxlength' => 100 8 | ]) 9 | @stop 10 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/resources/views/emails/contact-form-submission.blade.php: -------------------------------------------------------------------------------- 1 | Subject: {{ $title }} 2 | From: {{ $email }} 3 | Phone: {{ $phone_number }} 4 | Message: {{ $message }} 5 | -------------------------------------------------------------------------------- /app/Twill/Capsules/ContactFormSubmissions/routes/admin.php: -------------------------------------------------------------------------------- 1 | true, 13 | 'edit' => true, 14 | 'publish' => false, 15 | 'bulkPublish' => false, 16 | 'feature' => false, 17 | 'bulkFeature' => false, 18 | 'restore' => true, 19 | 'bulkRestore' => true, 20 | 'forceDelete' => true, 21 | 'bulkForceDelete' => true, 22 | 'delete' => true, 23 | 'duplicate' => false, 24 | 'bulkDelete' => true, 25 | 'reorder' => false, 26 | 'permalink' => false, 27 | 'bulkEdit' => true, 28 | 'editInModal' => false, 29 | ]; 30 | } 31 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/Http/Requests/MenuRequest.php: -------------------------------------------------------------------------------- 1 | hasMany(MenuItem::class)->ordered(); 40 | } 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/Models/MenuItem.php: -------------------------------------------------------------------------------- 1 | belongsTo(Menu::class); 53 | } 54 | 55 | public function linkable() 56 | { 57 | return $this->morphTo(); 58 | } 59 | 60 | public function getHrefAttribute() 61 | { 62 | switch ($this->destination) { 63 | case 'internal': 64 | if ($this->linkable) { 65 | $baseUrl = LaravelLocalization::localizeUrl(route('front.page', ['slug' => $this->linkable->slug])); 66 | } else { 67 | $baseUrl = '/'; 68 | } 69 | return $this->buildHref($baseUrl); 70 | break; 71 | case 'external': 72 | return $this->buildHref($this->url); 73 | break; 74 | case 'homepage': 75 | return '/'; 76 | break; 77 | } 78 | 79 | return '#'; 80 | } 81 | 82 | public function getTargetAttribute() 83 | { 84 | if ($this->new_window) { 85 | return "_blank"; 86 | } 87 | 88 | return ""; 89 | } 90 | 91 | public function getRelAttribute() 92 | { 93 | $rel = ""; 94 | if ($this->destination === 'external') { 95 | $rel .= "nofollow noreferrer"; 96 | } 97 | if ($this->new_window) { 98 | $rel .= " external"; 99 | } 100 | return $rel; 101 | } 102 | 103 | protected function buildHref($baseUrl) 104 | { 105 | $href = $baseUrl; 106 | 107 | if (!empty($this->query_string)) { 108 | $href .= "?" . $this->query_string; 109 | } 110 | 111 | if (!empty($this->anchor)) { 112 | $href .= "#" . $this->anchor; 113 | } 114 | 115 | return $href; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/Models/MenuItemTranslation.php: -------------------------------------------------------------------------------- 1 | model = $model; 19 | } 20 | 21 | public function prepareFieldsBeforeCreate($fields) 22 | { 23 | $fields = parent::prepareFieldsBeforeCreate($fields); 24 | $fields['linkable_id'] = Arr::get($fields, 'browsers.linkables.0.id', null); 25 | $fields['linkable_type'] = Arr::get($fields, 'browsers.linkables.0.endpointType', null); 26 | 27 | return $fields; 28 | } 29 | 30 | public function prepareFieldsBeforeSave($object, $fields) 31 | { 32 | $fields = parent::prepareFieldsBeforeSave($object, $fields); 33 | 34 | $id = Arr::get($fields, 'browsers.linkables.0.id', null); 35 | $type = Arr::get($fields, 'browsers.linkables.0.endpointType', null); 36 | 37 | if ($id) { 38 | $fields['linkable_id'] = $id; 39 | } 40 | if ($type) { 41 | $fields['linkable_type'] = $type; 42 | } 43 | 44 | return $fields; 45 | } 46 | 47 | public function getFormFields($object) 48 | { 49 | $fields = parent::getFormFields($object); 50 | 51 | $linkable = $object->linkable; 52 | 53 | if ($linkable) { 54 | $fields['browsers']['linkables'] = collect([ 55 | [ 56 | 'id' => $linkable->id, 57 | 'name' => $linkable->title, 58 | 'edit' => moduleRoute($object->linkable->getTable(), 'content', 'edit', $linkable->id), 59 | 'thumbnail' => $linkable->defaultCmsImage(['w' => 100, 'h' => 100]), 60 | ], 61 | ])->toArray(); 62 | } 63 | 64 | return $fields; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/Repositories/MenuRepository.php: -------------------------------------------------------------------------------- 1 | model = $model; 20 | } 21 | 22 | public function afterSave($object, $fields) 23 | { 24 | $this->updateRepeater( 25 | $object, 26 | $fields, 27 | 'menu_items', 28 | MenuItemRepository::class, 29 | 'menu_item' 30 | ); 31 | parent::afterSave($object, $fields); 32 | } 33 | 34 | public function getFormFields($object) 35 | { 36 | $fields = parent::getFormFields($object); 37 | $fields = $this->getFormFieldsForRepeater( 38 | $object, 39 | $fields, 40 | 'menu_items', 41 | MenuItemRepository::class, 42 | 'menu_item' 43 | ); 44 | return $fields; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/database/migrations/2021_11_01_093402_create_menus_tables.php: -------------------------------------------------------------------------------- 1 | integer('position')->unsigned()->nullable(); 15 | 16 | }); 17 | 18 | Schema::create('menu_translations', function (Blueprint $table) { 19 | createDefaultTranslationsTableFields($table, 'menu'); 20 | $table->string('title', 200)->nullable(); 21 | }); 22 | 23 | Schema::create('menu_slugs', function (Blueprint $table) { 24 | createDefaultSlugsTableFields($table, 'menu'); 25 | }); 26 | 27 | Schema::create('menu_revisions', function (Blueprint $table) { 28 | createDefaultRevisionsTableFields($table, 'menu'); 29 | }); 30 | } 31 | 32 | public function down() 33 | { 34 | Schema::dropIfExists('menu_revisions'); 35 | Schema::dropIfExists('menu_translations'); 36 | Schema::dropIfExists('menu_slugs'); 37 | Schema::dropIfExists('menus'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/database/migrations/2021_11_01_093602_create_menu_items_tables.php: -------------------------------------------------------------------------------- 1 | foreignId('menu_id')->constrained()->onDelete('cascade'); 15 | 16 | $table->bigInteger('linkable_id')->nullable(); 17 | $table->string('linkable_type')->nullable(); 18 | 19 | $table->string('destination')->nullable(); 20 | 21 | $table->string('anchor')->nullable(); 22 | 23 | $table->string('query_string')->nullable(); 24 | 25 | $table->string('class_attribute')->nullable(); 26 | 27 | $table->string('id_attribute')->nullable(); 28 | 29 | $table->boolean('new_window')->default(0); 30 | 31 | $table->text('rel_attribute')->nullable(); 32 | 33 | $table->integer('position')->unsigned()->nullable(); 34 | 35 | }); 36 | 37 | Schema::create('menu_item_translations', function (Blueprint $table) { 38 | createDefaultTranslationsTableFields($table, 'menu_item'); 39 | $table->string('title', 200)->nullable(); 40 | $table->string('url')->nullable(); 41 | }); 42 | 43 | } 44 | 45 | public function down() 46 | { 47 | Schema::dropIfExists('menu_item_translations'); 48 | Schema::dropIfExists('menu_items'); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/resources/views/admin/form.blade.php: -------------------------------------------------------------------------------- 1 | @extends('twill::layouts.form') 2 | 3 | @section('contentFields') 4 | @formField('repeater', [ 5 | 'type' => 'menu_item' 6 | ]) 7 | @stop 8 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/resources/views/admin/repeaters/menu_item.blade.php: -------------------------------------------------------------------------------- 1 | @twillRepeaterTitle('Menu Item') 2 | @twillRepeaterTitleField('title', ['hidePrefix' => false]) 3 | 4 | @formField('input', [ 5 | 'name' => 'title', 6 | 'label' => 'Title', 7 | 'translated' => true, 8 | ]) 9 | 10 | @formField('radios', [ 11 | 'label' => 'Link Type', 12 | 'name' => 'destination', 13 | 'inline' => true, 14 | 'options' => [ 15 | [ 16 | 'value' => 'internal', 17 | 'label' => 'Internal' 18 | ], 19 | [ 20 | 'value' => 'external', 21 | 'label' => 'External' 22 | ], 23 | [ 24 | 'value' => 'homepage', 25 | 'label' => 'Homepage' 26 | ], 27 | ] 28 | ]) 29 | {{-- Show Browser field to select internal item --}} 30 | 31 | @formField('browser', [ 32 | 'label' => 'Link', 33 | 'max' => 1, 34 | 'name' => 'linkables', 35 | 'moduleName' => 'content.pages' 36 | ]) 37 | 38 | 39 | {{-- Show text field to enter url if an external link is selected --}} 40 | 41 | @formField('input', [ 42 | 'name' => 'url', 43 | 'label' => 'Url', 44 | 'translated' => true, 45 | ]) 46 | 47 | 48 | 49 | @formField('input', [ 50 | 'name' => 'anchor', 51 | 'label' => 'Anchor', 52 | 'prefix' => '#' 53 | ]) 54 | @formField('input', [ 55 | 'name' => 'query_string', 56 | 'label' => 'Query String', 57 | 'prefix' => '?' 58 | ]) 59 | @formField('input', [ 60 | 'name' => 'id_attribute', 61 | 'label' => 'HTML ID' 62 | ]) 63 | @formField('input', [ 64 | 'name' => 'class_attribute', 65 | 'label' => 'CSS Class(es)', 66 | 'note' => 'A space separated list of classes to be added to the item' 67 | ]) 68 | @formField('checkbox', [ 69 | 'name' => 'new_window', 70 | 'label' => 'Open link in a new tab/window' 71 | ]) 72 | 73 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Menus/routes/admin.php: -------------------------------------------------------------------------------- 1 | group(function() { 4 | Route::module('menus'); 5 | }); 6 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/Http/Controllers/PageController.php: -------------------------------------------------------------------------------- 1 | [ 15 | 'title' => 'Title', 16 | 'field' => 'title', 17 | ], 18 | 'description' => [ 19 | 'title' => 'Description', 20 | 'field' => 'description', 21 | ], 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/Http/Requests/PageRequest.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'default' => [ 40 | [ 41 | 'name' => 'default', 42 | 'ratio' => 16 / 9, 43 | ], 44 | ], 45 | 'mobile' => [ 46 | [ 47 | 'name' => 'mobile', 48 | 'ratio' => 1, 49 | ], 50 | ], 51 | 'flexible' => [ 52 | [ 53 | 'name' => 'free', 54 | 'ratio' => 0, 55 | ], 56 | [ 57 | 'name' => 'landscape', 58 | 'ratio' => 16 / 9, 59 | ], 60 | [ 61 | 'name' => 'portrait', 62 | 'ratio' => 3 / 5, 63 | ], 64 | ], 65 | ], 66 | ]; 67 | } 68 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/Models/PageRevision.php: -------------------------------------------------------------------------------- 1 | model = $model; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/config.php: -------------------------------------------------------------------------------- 1 | [ 3 | 'files' => [ 4 | __DIR__.'/helpers.php' 5 | ] 6 | ] 7 | ]; 8 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/database/migrations/2021_10_18_122525_create_pages_tables.php: -------------------------------------------------------------------------------- 1 | timestamp('publish_start_date')->nullable(); 16 | // $table->timestamp('publish_end_date')->nullable(); 17 | }); 18 | 19 | Schema::create('page_translations', function (Blueprint $table) { 20 | createDefaultTranslationsTableFields($table, 'page'); 21 | $table->string('title', 200)->nullable(); 22 | $table->text('description')->nullable(); 23 | }); 24 | 25 | Schema::create('page_slugs', function (Blueprint $table) { 26 | createDefaultSlugsTableFields($table, 'page'); 27 | }); 28 | 29 | Schema::create('page_revisions', function (Blueprint $table) { 30 | createDefaultRevisionsTableFields($table, 'page'); 31 | }); 32 | } 33 | 34 | public function down() 35 | { 36 | Schema::dropIfExists('page_revisions'); 37 | Schema::dropIfExists('page_translations'); 38 | Schema::dropIfExists('page_slugs'); 39 | Schema::dropIfExists('pages'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(YourSeeder::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/helpers.php: -------------------------------------------------------------------------------- 1 | make(PageRepository::class); 9 | 10 | /** @var \A17\Twill\Models\Behaviors\HasSlug $page */ 11 | $page = $repo->getById($id); 12 | 13 | return $page->getSlug(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/resources/views/admin/form.blade.php: -------------------------------------------------------------------------------- 1 | @extends('twill::layouts.form') 2 | 3 | @section('contentFields') 4 | @formField('input', [ 5 | 'name' => 'description', 6 | 'label' => 'Description', 7 | 'translated' => true, 8 | 'maxlength' => 100 9 | ]) 10 | @formField('block_editor') 11 | @stop 12 | -------------------------------------------------------------------------------- /app/Twill/Capsules/Pages/routes/admin.php: -------------------------------------------------------------------------------- 1 | group(function() { 4 | Route::module('pages'); 5 | }); 6 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^8.0", 12 | "area17/twill": "2.x-dev", 13 | "blade-ui-kit/blade-heroicons": "^1.2", 14 | "cweagans/composer-patches": "^1.7", 15 | "fruitcake/laravel-cors": "^2.0", 16 | "guzzlehttp/guzzle": "^7.0.1", 17 | "kalnoy/nestedset": "^6.0", 18 | "laravel/framework": "^8.54", 19 | "laravel/sanctum": "^2.11", 20 | "laravel/tinker": "^2.5", 21 | "livewire/livewire": "^2.6", 22 | "mcamara/laravel-localization": "^1.6" 23 | }, 24 | "require-dev": { 25 | "roave/security-advisories": "dev-latest", 26 | "barryvdh/laravel-ide-helper": "^2.10", 27 | "facade/ignition": "^2.5", 28 | "fakerphp/faker": "^1.9.1", 29 | "laravel/sail": "^1.0.1", 30 | "mockery/mockery": "^1.4.4", 31 | "nunomaduro/collision": "^5.10", 32 | "phpunit/phpunit": "^9.5.8" 33 | }, 34 | "autoload": { 35 | "psr-4": { 36 | "App\\": "app/", 37 | "Database\\Factories\\": "database/factories/", 38 | "Database\\Seeders\\": "database/seeders/" 39 | } 40 | }, 41 | "autoload-dev": { 42 | "psr-4": { 43 | "Tests\\": "tests/" 44 | } 45 | }, 46 | "scripts": { 47 | "gen-docs": [ 48 | "php artisan ide-helper:generate", 49 | "php artisan ide-helper:meta", 50 | "php artisan ide-helper:models -M" 51 | ], 52 | "post-autoload-dump": [ 53 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 54 | "@php artisan package:discover --ansi" 55 | ], 56 | "post-install-cmd": [ 57 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 58 | ], 59 | "post-update-cmd": [ 60 | "@php artisan vendor:publish --tag=laravel-assets --ansi" 61 | ], 62 | "post-create-project-cmd": [ 63 | "@php artisan key:generate --ansi" 64 | ] 65 | }, 66 | "extra": { 67 | "patches": { 68 | "area17/twill": { 69 | "Blade components": "https://patch-diff.githubusercontent.com/raw/area17/twill/pull/1360.patch" 70 | } 71 | }, 72 | "laravel": { 73 | "dont-discover": [] 74 | } 75 | }, 76 | "config": { 77 | "optimize-autoloader": true, 78 | "preferred-install": "dist", 79 | "sort-packages": true, 80 | "allow-plugins": { 81 | "cweagans/composer-patches": true 82 | } 83 | }, 84 | "minimum-stability": "dev", 85 | "prefer-stable": true 86 | } 87 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication drivers have a user provider. This defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | mechanisms used by this application to persist your user's data. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | sources which represent each model / table. These sources may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => App\Models\User::class, 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may specify multiple password reset configurations if you have more 80 | | than one user table or model in the application and you want to have 81 | | separate password reset settings based on the specific user types. 82 | | 83 | | The expire time is the number of minutes that the reset token should be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | */ 88 | 89 | 'passwords' => [ 90 | 'users' => [ 91 | 'provider' => 'users', 92 | 'table' => 'password_resets', 93 | 'expire' => 60, 94 | 'throttle' => 60, 95 | ], 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Password Confirmation Timeout 101 | |-------------------------------------------------------------------------- 102 | | 103 | | Here you may define the amount of seconds before a password confirmation 104 | | times out and the user is prompted to re-enter their password via the 105 | | confirmation screen. By default, the timeout lasts for three hours. 106 | | 107 | */ 108 | 109 | 'password_timeout' => 10800, 110 | 111 | ]; 112 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | ], 56 | 57 | 'memcached' => [ 58 | 'driver' => 'memcached', 59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 60 | 'sasl' => [ 61 | env('MEMCACHED_USERNAME'), 62 | env('MEMCACHED_PASSWORD'), 63 | ], 64 | 'options' => [ 65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 66 | ], 67 | 'servers' => [ 68 | [ 69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 70 | 'port' => env('MEMCACHED_PORT', 11211), 71 | 'weight' => 100, 72 | ], 73 | ], 74 | ], 75 | 76 | 'redis' => [ 77 | 'driver' => 'redis', 78 | 'connection' => 'cache', 79 | 'lock_connection' => 'default', 80 | ], 81 | 82 | 'dynamodb' => [ 83 | 'driver' => 'dynamodb', 84 | 'key' => env('AWS_ACCESS_KEY_ID'), 85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 88 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 89 | ], 90 | 91 | 'octane' => [ 92 | 'driver' => 'octane', 93 | ], 94 | 95 | ], 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Cache Key Prefix 100 | |-------------------------------------------------------------------------- 101 | | 102 | | When utilizing a RAM based store such as APC or Memcached, there might 103 | | be other applications utilizing the same cache. So, we'll specify a 104 | | value to get prefixed to all our keys so we can avoid collisions. 105 | | 106 | */ 107 | 108 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'schema' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | ], 93 | 94 | ], 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Migration Repository Table 99 | |-------------------------------------------------------------------------- 100 | | 101 | | This table keeps track of all the migrations that have already run for 102 | | your application. Using this information, we can determine which of 103 | | the migrations on disk haven't actually been run in the database. 104 | | 105 | */ 106 | 107 | 'migrations' => 'migrations', 108 | 109 | /* 110 | |-------------------------------------------------------------------------- 111 | | Redis Databases 112 | |-------------------------------------------------------------------------- 113 | | 114 | | Redis is an open source, fast, and advanced key-value store that also 115 | | provides a richer body of commands than a typical key-value system 116 | | such as APC or Memcached. Laravel makes it easy to dig right in. 117 | | 118 | */ 119 | 120 | 'redis' => [ 121 | 122 | 'client' => env('REDIS_CLIENT', 'phpredis'), 123 | 124 | 'options' => [ 125 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 126 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 127 | ], 128 | 129 | 'default' => [ 130 | 'url' => env('REDIS_URL'), 131 | 'host' => env('REDIS_HOST', '127.0.0.1'), 132 | 'password' => env('REDIS_PASSWORD', null), 133 | 'port' => env('REDIS_PORT', '6379'), 134 | 'database' => env('REDIS_DB', '0'), 135 | ], 136 | 137 | 'cache' => [ 138 | 'url' => env('REDIS_URL'), 139 | 'host' => env('REDIS_HOST', '127.0.0.1'), 140 | 'password' => env('REDIS_PASSWORD', null), 141 | 'port' => env('REDIS_PORT', '6379'), 142 | 'database' => env('REDIS_CACHE_DB', '1'), 143 | ], 144 | 145 | ], 146 | 147 | ]; 148 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been setup for each driver as an example of the required options. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | ], 37 | 38 | 'public' => [ 39 | 'driver' => 'local', 40 | 'root' => storage_path('app/public'), 41 | 'url' => env('APP_URL').'/storage', 42 | 'visibility' => 'public', 43 | ], 44 | 45 | 's3' => [ 46 | 'driver' => 's3', 47 | 'key' => env('AWS_ACCESS_KEY_ID'), 48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 49 | 'region' => env('AWS_DEFAULT_REGION'), 50 | 'bucket' => env('AWS_BUCKET'), 51 | 'url' => env('AWS_URL'), 52 | 'endpoint' => env('AWS_ENDPOINT'), 53 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 54 | ], 55 | 56 | ], 57 | 58 | /* 59 | |-------------------------------------------------------------------------- 60 | | Symbolic Links 61 | |-------------------------------------------------------------------------- 62 | | 63 | | Here you may configure the symbolic links that will be created when the 64 | | `storage:link` Artisan command is executed. The array keys should be 65 | | the locations of the links and the values should be their targets. 66 | | 67 | */ 68 | 69 | 'links' => [ 70 | public_path('storage') => storage_path('app/public'), 71 | ], 72 | 73 | ]; 74 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/livewire.php: -------------------------------------------------------------------------------- 1 | 'App\\Http\\Livewire', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This value sets the path for Livewire component views. This affects 26 | | file manipulation helper commands like `artisan make:livewire`. 27 | | 28 | */ 29 | 30 | 'view_path' => resource_path('views/livewire'), 31 | 32 | /* 33 | |-------------------------------------------------------------------------- 34 | | Layout 35 | |-------------------------------------------------------------------------- 36 | | The default layout view that will be used when rendering a component via 37 | | Route::get('/some-endpoint', SomeComponent::class);. In this case the 38 | | the view returned by SomeComponent will be wrapped in "layouts.app" 39 | | 40 | */ 41 | 42 | 'layout' => 'layouts.app', 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Livewire Assets URL 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This value sets the path to Livewire JavaScript assets, for cases where 50 | | your app's domain root is not the correct path. By default, Livewire 51 | | will load its JavaScript assets from the app's "relative root". 52 | | 53 | | Examples: "/assets", "myurl.com/app". 54 | | 55 | */ 56 | 57 | 'asset_url' => null, 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | Livewire Endpoint Middleware Group 62 | |-------------------------------------------------------------------------- 63 | | 64 | | This value sets the middleware group that will be applied to the main 65 | | Livewire "message" endpoint (the endpoint that gets hit everytime 66 | | a Livewire component updates). It is set to "web" by default. 67 | | 68 | */ 69 | 70 | 'middleware_group' => 'web', 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Livewire Temporary File Uploads Endpoint Configuration 75 | |-------------------------------------------------------------------------- 76 | | 77 | | Livewire handles file uploads by storing uploads in a temporary directory 78 | | before the file is validated and stored permanently. All file uploads 79 | | are directed to a global endpoint for temporary storage. The config 80 | | items below are used for customizing the way the endpoint works. 81 | | 82 | */ 83 | 84 | 'temporary_file_upload' => [ 85 | 'disk' => null, // Example: 'local', 's3' Default: 'default' 86 | 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB) 87 | 'directory' => null, // Example: 'tmp' Default 'livewire-tmp' 88 | 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1' 89 | 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs. 90 | 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', 91 | 'mov', 'avi', 'wmv', 'mp3', 'm4a', 92 | 'jpg', 'jpeg', 'mpga', 'webp', 'wma', 93 | ], 94 | 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated. 95 | ], 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Manifest File Path 100 | |-------------------------------------------------------------------------- 101 | | 102 | | This value sets the path to the Livewire manifest file. 103 | | The default should work for most cases (which is 104 | | "/bootstrap/cache/livewire-components.php"), but for specific 105 | | cases like when hosting on Laravel Vapor, it could be set to a different value. 106 | | 107 | | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php". 108 | | 109 | */ 110 | 111 | 'manifest_path' => null, 112 | 113 | /* 114 | |-------------------------------------------------------------------------- 115 | | Back Button Cache 116 | |-------------------------------------------------------------------------- 117 | | 118 | | This value determines whether the back button cache will be used on pages 119 | | that contain Livewire. By disabling back button cache, it ensures that 120 | | the back button shows the correct state of components, instead of 121 | | potentially stale, cached data. 122 | | 123 | | Setting it to "false" (default) will disable back button cache. 124 | | 125 | */ 126 | 127 | 'back_button_cache' => false, 128 | 129 | ]; 130 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => env('LOG_LEVEL', 'debug'), 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => env('LOG_LEVEL', 'debug'), 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => env('LOG_LEVEL', 'critical'), 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => env('LOG_LEVEL', 'debug'), 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'level' => env('LOG_LEVEL', 'debug'), 78 | 'handler' => StreamHandler::class, 79 | 'formatter' => env('LOG_STDERR_FORMATTER'), 80 | 'with' => [ 81 | 'stream' => 'php://stderr', 82 | ], 83 | ], 84 | 85 | 'syslog' => [ 86 | 'driver' => 'syslog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | ], 89 | 90 | 'errorlog' => [ 91 | 'driver' => 'errorlog', 92 | 'level' => env('LOG_LEVEL', 'debug'), 93 | ], 94 | 95 | 'null' => [ 96 | 'driver' => 'monolog', 97 | 'handler' => NullHandler::class, 98 | ], 99 | 100 | 'emergency' => [ 101 | 'path' => storage_path('logs/laravel.log'), 102 | ], 103 | ], 104 | 105 | ]; 106 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array", "failover" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'auth_mode' => null, 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => '/usr/sbin/sendmail -bs', 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | 74 | 'failover' => [ 75 | 'transport' => 'failover', 76 | 'mailers' => [ 77 | 'smtp', 78 | 'log', 79 | ], 80 | ], 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Global "From" Address 86 | |-------------------------------------------------------------------------- 87 | | 88 | | You may wish for all e-mails sent by your application to be sent from 89 | | the same address. Here, you may specify a name and address that is 90 | | used globally for all e-mails that are sent by your application. 91 | | 92 | */ 93 | 94 | 'from' => [ 95 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 96 | 'name' => env('MAIL_FROM_NAME', 'Example'), 97 | ], 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Markdown Mail Settings 102 | |-------------------------------------------------------------------------- 103 | | 104 | | If you are using Markdown based email rendering, you may configure your 105 | | theme and component paths here, allowing you to customize the design 106 | | of the emails. Or, you may simply stick with the Laravel defaults! 107 | | 108 | */ 109 | 110 | 'markdown' => [ 111 | 'theme' => 'default', 112 | 113 | 'paths' => [ 114 | resource_path('views/vendor/mail'), 115 | ], 116 | ], 117 | 118 | ]; 119 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Failed Queue Jobs 79 | |-------------------------------------------------------------------------- 80 | | 81 | | These options configure the behavior of failed queue job logging so you 82 | | can control which database and table are used to store the jobs that 83 | | have failed. You may change them to any database / table you wish. 84 | | 85 | */ 86 | 87 | 'failed' => [ 88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 89 | 'database' => env('DB_CONNECTION', 'mysql'), 90 | 'table' => 'failed_jobs', 91 | ], 92 | 93 | ]; 94 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 17 | '%s%s', 18 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 19 | env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : '' 20 | ))), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Expiration Minutes 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This value controls the number of minutes until an issued token will be 28 | | considered expired. If this value is null, personal access tokens do 29 | | not expire. This won't tweak the lifetime of first-party sessions. 30 | | 31 | */ 32 | 33 | 'expiration' => null, 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Sanctum Middleware 38 | |-------------------------------------------------------------------------- 39 | | 40 | | When authenticating your first-party SPA with Sanctum you may need to 41 | | customize some of the middleware Sanctum uses while processing the 42 | | request. You may change the middleware listed below as required. 43 | | 44 | */ 45 | 46 | 'middleware' => [ 47 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 48 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 49 | ], 50 | 51 | ]; 52 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Session Lifetime 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may specify the number of minutes that you wish the session 29 | | to be allowed to remain idle before it expires. If you want them 30 | | to immediately expire on the browser closing, set that option. 31 | | 32 | */ 33 | 34 | 'lifetime' => env('SESSION_LIFETIME', 120), 35 | 36 | 'expire_on_close' => false, 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Session Encryption 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This option allows you to easily specify that all of your session data 44 | | should be encrypted before it is stored. All encryption will be run 45 | | automatically by Laravel and you can use the Session like normal. 46 | | 47 | */ 48 | 49 | 'encrypt' => false, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Session File Location 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When using the native session driver, we need a location where session 57 | | files may be stored. A default has been set for you but a different 58 | | location may be specified. This is only needed for file sessions. 59 | | 60 | */ 61 | 62 | 'files' => storage_path('framework/sessions'), 63 | 64 | /* 65 | |-------------------------------------------------------------------------- 66 | | Session Database Connection 67 | |-------------------------------------------------------------------------- 68 | | 69 | | When using the "database" or "redis" session drivers, you may specify a 70 | | connection that should be used to manage these sessions. This should 71 | | correspond to a connection in your database configuration options. 72 | | 73 | */ 74 | 75 | 'connection' => env('SESSION_CONNECTION', null), 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Session Database Table 80 | |-------------------------------------------------------------------------- 81 | | 82 | | When using the "database" session driver, you may specify the table we 83 | | should use to manage the sessions. Of course, a sensible default is 84 | | provided for you; however, you are free to change this as needed. 85 | | 86 | */ 87 | 88 | 'table' => 'sessions', 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Session Cache Store 93 | |-------------------------------------------------------------------------- 94 | | 95 | | While using one of the framework's cache driven session backends you may 96 | | list a cache store that should be used for these sessions. This value 97 | | must match with one of the application's configured cache "stores". 98 | | 99 | | Affects: "apc", "dynamodb", "memcached", "redis" 100 | | 101 | */ 102 | 103 | 'store' => env('SESSION_STORE', null), 104 | 105 | /* 106 | |-------------------------------------------------------------------------- 107 | | Session Sweeping Lottery 108 | |-------------------------------------------------------------------------- 109 | | 110 | | Some session drivers must manually sweep their storage location to get 111 | | rid of old sessions from storage. Here are the chances that it will 112 | | happen on a given request. By default, the odds are 2 out of 100. 113 | | 114 | */ 115 | 116 | 'lottery' => [2, 100], 117 | 118 | /* 119 | |-------------------------------------------------------------------------- 120 | | Session Cookie Name 121 | |-------------------------------------------------------------------------- 122 | | 123 | | Here you may change the name of the cookie used to identify a session 124 | | instance by ID. The name specified here will get used every time a 125 | | new session cookie is created by the framework for every driver. 126 | | 127 | */ 128 | 129 | 'cookie' => env( 130 | 'SESSION_COOKIE', 131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session' 132 | ), 133 | 134 | /* 135 | |-------------------------------------------------------------------------- 136 | | Session Cookie Path 137 | |-------------------------------------------------------------------------- 138 | | 139 | | The session cookie path determines the path for which the cookie will 140 | | be regarded as available. Typically, this will be the root path of 141 | | your application but you are free to change this when necessary. 142 | | 143 | */ 144 | 145 | 'path' => '/', 146 | 147 | /* 148 | |-------------------------------------------------------------------------- 149 | | Session Cookie Domain 150 | |-------------------------------------------------------------------------- 151 | | 152 | | Here you may change the domain of the cookie used to identify a session 153 | | in your application. This will determine which domains the cookie is 154 | | available to in your application. A sensible default has been set. 155 | | 156 | */ 157 | 158 | 'domain' => env('SESSION_DOMAIN', null), 159 | 160 | /* 161 | |-------------------------------------------------------------------------- 162 | | HTTPS Only Cookies 163 | |-------------------------------------------------------------------------- 164 | | 165 | | By setting this option to true, session cookies will only be sent back 166 | | to the server if the browser has a HTTPS connection. This will keep 167 | | the cookie from being sent to you when it can't be done securely. 168 | | 169 | */ 170 | 171 | 'secure' => env('SESSION_SECURE_COOKIE'), 172 | 173 | /* 174 | |-------------------------------------------------------------------------- 175 | | HTTP Access Only 176 | |-------------------------------------------------------------------------- 177 | | 178 | | Setting this value to true will prevent JavaScript from accessing the 179 | | value of the cookie and the cookie will only be accessible through 180 | | the HTTP protocol. You are free to modify this option if needed. 181 | | 182 | */ 183 | 184 | 'http_only' => true, 185 | 186 | /* 187 | |-------------------------------------------------------------------------- 188 | | Same-Site Cookies 189 | |-------------------------------------------------------------------------- 190 | | 191 | | This option determines how your cookies behave when cross-site requests 192 | | take place, and can be used to mitigate CSRF attacks. By default, we 193 | | will set this value to "lax" since this is a secure default value. 194 | | 195 | | Supported: "lax", "strict", "none", null 196 | | 197 | */ 198 | 199 | 'same_site' => 'lax', 200 | 201 | ]; 202 | -------------------------------------------------------------------------------- /config/translatable.php: -------------------------------------------------------------------------------- 1 | [ 14 | 'en', 15 | 'nl', 16 | ], 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Locale separator 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This is a string used to glue the language and the country when defining 24 | | the available locales. Example: if set to '-', then the locale for 25 | | colombian spanish will be saved as 'es-CO' into the database. 26 | | 27 | */ 28 | 'locale_separator' => '-', 29 | 30 | /* 31 | |-------------------------------------------------------------------------- 32 | | Default locale 33 | |-------------------------------------------------------------------------- 34 | | 35 | | As a default locale, Translatable takes the locale of Laravel's 36 | | translator. If for some reason you want to override this, 37 | | you can specify what default should be used here. 38 | | 39 | */ 40 | 'locale' => null, 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Use fallback 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Determine if fallback locales are returned by default or not. To add 48 | | more flexibility and configure this option per "translatable" 49 | | instance, this value will be overridden by the property 50 | | $useTranslationFallback when defined 51 | | 52 | */ 53 | 'use_fallback' => false, 54 | 55 | /* 56 | |-------------------------------------------------------------------------- 57 | | Use fallback per property 58 | |-------------------------------------------------------------------------- 59 | | 60 | | The property fallback feature will return the translated value of 61 | | the fallback locale if the property is empty for the selected 62 | | locale. Note that 'use_fallback' must be enabled. 63 | | 64 | */ 65 | 'use_property_fallback' => true, 66 | 67 | /* 68 | |-------------------------------------------------------------------------- 69 | | Fallback Locale 70 | |-------------------------------------------------------------------------- 71 | | 72 | | A fallback locale is the locale being used to return a translation 73 | | when the requested translation is not existing. To disable it 74 | | set it to false. 75 | | 76 | */ 77 | 'fallback_locale' => 'en', 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Translation Suffix 82 | |-------------------------------------------------------------------------- 83 | | 84 | | Defines the default 'Translation' class suffix. For example, if 85 | | you want to use CountryTrans instead of CountryTranslation 86 | | application, set this to 'Trans'. 87 | | 88 | */ 89 | 'translation_suffix' => 'Translation', 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Locale key 94 | |-------------------------------------------------------------------------- 95 | | 96 | | Defines the 'locale' field name, which is used by the 97 | | translation model. 98 | | 99 | */ 100 | 'locale_key' => 'locale', 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Always load translations when converting to array 105 | |-------------------------------------------------------------------------- 106 | | Setting this to false will have a performance improvement but will 107 | | not return the translations when using toArray(), unless the 108 | | translations relationship is already loaded. 109 | | 110 | */ 111 | 'to_array_always_loads_translations' => true, 112 | ]; 113 | -------------------------------------------------------------------------------- /config/twill-navigation.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'title' => 'Custom page', 6 | 'route' => 'admin.customPage', 7 | ], 8 | 'content' => [ 9 | 'title' => 'Content', 10 | 'route' => 'admin.content.pages.index', 11 | 'primary_navigation' => [ 12 | 'pages' => [ 13 | 'title' => 'Pages', 14 | 'module' => true, 15 | ], 16 | 'menus' => [ 17 | 'title' => 'Menu', 18 | 'module' => true, 19 | ], 20 | ], 21 | ], 22 | 'contactFormSubmissions' => [ 23 | 'title' => 'Contact messages', 24 | 'module' => true, 25 | ], 26 | 'settings' => [ 27 | 'title' => 'Settings', 28 | 'route' => 'admin.settings', 29 | 'params' => ['section' => 'pages'], 30 | 'primary_navigation' => [ 31 | 'pages' => [ 32 | 'title' => 'Pages', 33 | 'route' => 'admin.settings', 34 | 'params' => ['section' => 'pages'], 35 | ], 36 | 'footer' => [ 37 | 'title' => 'Footer', 38 | 'route' => 'admin.settings', 39 | 'params' => ['section' => 'footer'], 40 | ], 41 | ], 42 | ], 43 | ]; 44 | -------------------------------------------------------------------------------- /config/twill.php: -------------------------------------------------------------------------------- 1 | [ 5 | [ 6 | 'name' => 'desktop', 7 | 'ratio' => 16 / 9, 8 | 'minValues' => [ 9 | 'width' => 100, 10 | 'height' => 100, 11 | ], 12 | ], 13 | ], 14 | 'full' => [ 15 | [ 16 | 'name' => 'full', 17 | 'ratio' => 0, 18 | ], 19 | ], 20 | ]; 21 | 22 | return [ 23 | 'dashboard' => [ 24 | 'modules' => [ 25 | 'pages' => [ 26 | 'name' => 'pages', 27 | 'routePrefix' => 'content', 28 | 'repository' => \App\Twill\Capsules\Pages\Repositories\PageRepository::class, 29 | 'count' => true, 30 | 'create' => true, 31 | 'activity' => true, 32 | 'draft' => true, 33 | 'search' => true, 34 | 'search_fields' => ['title'] 35 | ], 36 | ], 37 | ], 38 | 'publish_date_24h' => true, 39 | 'settings' => true, 40 | 'locale' => 'en', 41 | 'activitylog' => true, 42 | 'fallback_locale' => 'en', 43 | 'available_user_locales' => [ 44 | 'en', 45 | 'nl', 46 | ], 47 | 'capsules' => [ 48 | 'list' => [ 49 | [ 50 | 'name' => 'Base', 51 | 'enabled' => true, 52 | ], 53 | [ 54 | 'name' => 'Pages', 55 | 'enabled' => true, 56 | ], 57 | [ 58 | 'name' => 'Menus', 59 | 'enabled' => true, 60 | ], 61 | [ 62 | 'name' => 'ContactFormSubmissions', 63 | 'enabled' => true, 64 | ], 65 | ], 66 | ], 67 | 'block_editor' => [ 68 | 'use_twill_blocks' => [], 69 | 'block_preview_render_childs' => false, 70 | 'crops' => [ 71 | 'image' => $cropConfig, 72 | 'heading' => $cropConfig, 73 | 'gallery' => $cropConfig, 74 | 'content_square' => [ 75 | 'desktop' => [ 76 | [ 77 | 'name' => 'desktop', 78 | 'ratio' => 4 / 3, 79 | 'minValues' => [ 80 | 'width' => 100, 81 | 'height' => 100, 82 | ], 83 | ], 84 | ], 85 | ], 86 | 'content_image' => [ 87 | 'flexible' => [ 88 | [ 89 | 'name' => 'free', 90 | 'ratio' => 0, 91 | ], 92 | ], 93 | ], 94 | ], 95 | ], 96 | ]; 97 | -------------------------------------------------------------------------------- /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/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name(), 27 | 'email' => $this->faker->unique()->safeEmail(), 28 | 'email_verified_at' => now(), 29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | 34 | /** 35 | * Indicate that the model's email address should be unverified. 36 | * 37 | * @return \Illuminate\Database\Eloquent\Factories\Factory 38 | */ 39 | public function unverified() 40 | { 41 | return $this->state(function (array $attributes) { 42 | return [ 43 | 'email_verified_at' => null, 44 | ]; 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->morphs('tokenable'); 19 | $table->string('name'); 20 | $table->string('token', 64)->unique(); 21 | $table->text('abilities')->nullable(); 22 | $table->timestamp('last_used_at')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('personal_access_tokens'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | 'rob', 14 | 'email' => 'rob@webisolv.com', 15 | 'password' => Hash::make('webisolv'), 16 | 'published' => 1, 17 | 'role' => 'SUPERADMIN' 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production" 11 | }, 12 | "devDependencies": { 13 | "autoprefixer": "^10.3.7", 14 | "axios": "^0.21", 15 | "browser-sync": "^2.27.5", 16 | "browser-sync-webpack-plugin": "^2.3.0", 17 | "laravel-mix": "^6.0.6", 18 | "lodash": "^4.17.19", 19 | "postcss": "^8.3.9", 20 | "tailwindcss": "^2.2.17" 21 | }, 22 | "dependencies": { 23 | "@tailwindcss/typography": "^0.4.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Bold.34356f6b.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Bold.34356f6b.woff2 -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Bold.61c493e3.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Bold.61c493e3.woff -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-BoldItalic.57acb479.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-BoldItalic.57acb479.woff2 -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-BoldItalic.6fbcf86a.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-BoldItalic.6fbcf86a.woff -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Italic.35cf8109.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Italic.35cf8109.woff -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Italic.381444ec.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Italic.381444ec.woff2 -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Medium.2e5e0884.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Medium.2e5e0884.woff2 -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Medium.c09fb389.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Medium.c09fb389.woff -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-MediumItalic.7a7fd735.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-MediumItalic.7a7fd735.woff2 -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-MediumItalic.ad6e093c.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-MediumItalic.ad6e093c.woff -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Regular.aebfbb3c.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Regular.aebfbb3c.woff -------------------------------------------------------------------------------- /public/assets/admin/fonts/Inter-Regular.bffaed79.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/admin/fonts/Inter-Regular.bffaed79.woff2 -------------------------------------------------------------------------------- /public/assets/admin/js/main-free.75070804.js: -------------------------------------------------------------------------------- 1 | (function(e){function r(r){for(var n,u,i=r[0],c=r[1],f=r[2],p=0,s=[];p 3 | 4 | 5 | 7 | 8 | 9 | 11 | 12 | 13 | 15 | 16 | 17 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /public/assets/blurry-gradient-haikei.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /public/assets/intersect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 33 | 34 | 36 | 38 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /public/assets/store-desk-helping.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/assets/store-desk-helping.jpg -------------------------------------------------------------------------------- /public/assets/streamline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/js/app.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Lodash 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 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/vendor/livewire/manifest.json: -------------------------------------------------------------------------------- 1 | {"/livewire.js":"/livewire.js?id=21fa1dd78491a49255cd"} -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | window.axios = require('axios'); 10 | 11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 12 | 13 | /** 14 | * Echo exposes an expressive API for subscribing to channels and listening 15 | * for events that are broadcast by Laravel. Echo and event broadcasting 16 | * allows your team to easily build robust real-time web applications. 17 | */ 18 | 19 | // import Echo from 'laravel-echo'; 20 | 21 | // window.Pusher = require('pusher-js'); 22 | 23 | // window.Echo = new Echo({ 24 | // broadcaster: 'pusher', 25 | // key: process.env.MIX_PUSHER_APP_KEY, 26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 27 | // forceTLS: true 28 | // }); 29 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'accepted_if' => 'The :attribute must be accepted when :other is :value.', 18 | 'active_url' => 'The :attribute is not a valid URL.', 19 | 'after' => 'The :attribute must be a date after :date.', 20 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 21 | 'alpha' => 'The :attribute must only contain letters.', 22 | 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', 23 | 'alpha_num' => 'The :attribute must only contain letters and numbers.', 24 | 'array' => 'The :attribute must be an array.', 25 | 'before' => 'The :attribute must be a date before :date.', 26 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 27 | 'between' => [ 28 | 'numeric' => 'The :attribute must be between :min and :max.', 29 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 30 | 'string' => 'The :attribute must be between :min and :max characters.', 31 | 'array' => 'The :attribute must have between :min and :max items.', 32 | ], 33 | 'boolean' => 'The :attribute field must be true or false.', 34 | 'confirmed' => 'The :attribute confirmation does not match.', 35 | 'current_password' => 'The password is incorrect.', 36 | 'date' => 'The :attribute is not a valid date.', 37 | 'date_equals' => 'The :attribute must be a date equal to :date.', 38 | 'date_format' => 'The :attribute does not match the format :format.', 39 | 'different' => 'The :attribute and :other must be different.', 40 | 'digits' => 'The :attribute must be :digits digits.', 41 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 42 | 'dimensions' => 'The :attribute has invalid image dimensions.', 43 | 'distinct' => 'The :attribute field has a duplicate value.', 44 | 'email' => 'The :attribute must be a valid email address.', 45 | 'ends_with' => 'The :attribute must end with one of the following: :values.', 46 | 'exists' => 'The selected :attribute is invalid.', 47 | 'file' => 'The :attribute must be a file.', 48 | 'filled' => 'The :attribute field must have a value.', 49 | 'gt' => [ 50 | 'numeric' => 'The :attribute must be greater than :value.', 51 | 'file' => 'The :attribute must be greater than :value kilobytes.', 52 | 'string' => 'The :attribute must be greater than :value characters.', 53 | 'array' => 'The :attribute must have more than :value items.', 54 | ], 55 | 'gte' => [ 56 | 'numeric' => 'The :attribute must be greater than or equal to :value.', 57 | 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', 58 | 'string' => 'The :attribute must be greater than or equal to :value characters.', 59 | 'array' => 'The :attribute must have :value items or more.', 60 | ], 61 | 'image' => 'The :attribute must be an image.', 62 | 'in' => 'The selected :attribute is invalid.', 63 | 'in_array' => 'The :attribute field does not exist in :other.', 64 | 'integer' => 'The :attribute must be an integer.', 65 | 'ip' => 'The :attribute must be a valid IP address.', 66 | 'ipv4' => 'The :attribute must be a valid IPv4 address.', 67 | 'ipv6' => 'The :attribute must be a valid IPv6 address.', 68 | 'json' => 'The :attribute must be a valid JSON string.', 69 | 'lt' => [ 70 | 'numeric' => 'The :attribute must be less than :value.', 71 | 'file' => 'The :attribute must be less than :value kilobytes.', 72 | 'string' => 'The :attribute must be less than :value characters.', 73 | 'array' => 'The :attribute must have less than :value items.', 74 | ], 75 | 'lte' => [ 76 | 'numeric' => 'The :attribute must be less than or equal to :value.', 77 | 'file' => 'The :attribute must be less than or equal to :value kilobytes.', 78 | 'string' => 'The :attribute must be less than or equal to :value characters.', 79 | 'array' => 'The :attribute must not have more than :value items.', 80 | ], 81 | 'max' => [ 82 | 'numeric' => 'The :attribute must not be greater than :max.', 83 | 'file' => 'The :attribute must not be greater than :max kilobytes.', 84 | 'string' => 'The :attribute must not be greater than :max characters.', 85 | 'array' => 'The :attribute must not have more than :max items.', 86 | ], 87 | 'mimes' => 'The :attribute must be a file of type: :values.', 88 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 89 | 'min' => [ 90 | 'numeric' => 'The :attribute must be at least :min.', 91 | 'file' => 'The :attribute must be at least :min kilobytes.', 92 | 'string' => 'The :attribute must be at least :min characters.', 93 | 'array' => 'The :attribute must have at least :min items.', 94 | ], 95 | 'multiple_of' => 'The :attribute must be a multiple of :value.', 96 | 'not_in' => 'The selected :attribute is invalid.', 97 | 'not_regex' => 'The :attribute format is invalid.', 98 | 'numeric' => 'The :attribute must be a number.', 99 | 'password' => 'The password is incorrect.', 100 | 'present' => 'The :attribute field must be present.', 101 | 'regex' => 'The :attribute format is invalid.', 102 | 'required' => 'The :attribute field is required.', 103 | 'required_if' => 'The :attribute field is required when :other is :value.', 104 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 105 | 'required_with' => 'The :attribute field is required when :values is present.', 106 | 'required_with_all' => 'The :attribute field is required when :values are present.', 107 | 'required_without' => 'The :attribute field is required when :values is not present.', 108 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 109 | 'prohibited' => 'The :attribute field is prohibited.', 110 | 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', 111 | 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', 112 | 'prohibits' => 'The :attribute field prohibits :other from being present.', 113 | 'same' => 'The :attribute and :other must match.', 114 | 'size' => [ 115 | 'numeric' => 'The :attribute must be :size.', 116 | 'file' => 'The :attribute must be :size kilobytes.', 117 | 'string' => 'The :attribute must be :size characters.', 118 | 'array' => 'The :attribute must contain :size items.', 119 | ], 120 | 'starts_with' => 'The :attribute must start with one of the following: :values.', 121 | 'string' => 'The :attribute must be a string.', 122 | 'timezone' => 'The :attribute must be a valid timezone.', 123 | 'unique' => 'The :attribute has already been taken.', 124 | 'uploaded' => 'The :attribute failed to upload.', 125 | 'url' => 'The :attribute must be a valid URL.', 126 | 'uuid' => 'The :attribute must be a valid UUID.', 127 | 128 | /* 129 | |-------------------------------------------------------------------------- 130 | | Custom Validation Language Lines 131 | |-------------------------------------------------------------------------- 132 | | 133 | | Here you may specify custom validation messages for attributes using the 134 | | convention "attribute.rule" to name the lines. This makes it quick to 135 | | specify a specific custom language line for a given attribute rule. 136 | | 137 | */ 138 | 139 | 'custom' => [ 140 | 'attribute-name' => [ 141 | 'rule-name' => 'custom-message', 142 | ], 143 | ], 144 | 145 | /* 146 | |-------------------------------------------------------------------------- 147 | | Custom Validation Attributes 148 | |-------------------------------------------------------------------------- 149 | | 150 | | The following language lines are used to swap our attribute placeholder 151 | | with something more reader friendly such as "E-Mail Address" instead 152 | | of "email". This simply helps us make our message more expressive. 153 | | 154 | */ 155 | 156 | 'attributes' => [], 157 | 158 | ]; 159 | -------------------------------------------------------------------------------- /resources/views/admin/blocks/contact-form.blade.php: -------------------------------------------------------------------------------- 1 | @twillBlockTitle('Contact Form') 2 | @twillBlockIcon('text') 3 | @twillBlockGroup('app') 4 | 5 | @formField('wysiwyg', [ 6 | 'name' => 'text', 7 | 'label' => 'Content next to the form', 8 | 'placeholder' => 'Text', 9 | 'toolbarOptions' => [ 10 | 'bold', 11 | 'italic', 12 | ['list' => 'bullet'], 13 | ['list' => 'ordered'], 14 | [ 'script' => 'super' ], 15 | [ 'script' => 'sub' ], 16 | 'link', 17 | 'clean' 18 | ], 19 | 'translated' => true 20 | ]) 21 | 22 | @formField('input', [ 23 | 'name' => 'success_message', 24 | 'label' => __('Success message'), 25 | 'translated' => true, 26 | ]) 27 | -------------------------------------------------------------------------------- /resources/views/admin/blocks/faq-list.blade.php: -------------------------------------------------------------------------------- 1 | @twillBlockTitle('Faq List') 2 | @twillBlockIcon('text') 3 | @twillBlockGroup('app') 4 | 5 | @formField('repeater', ['type' => 'faq-item', 'name' => 'Faq entries']) 6 | -------------------------------------------------------------------------------- /resources/views/admin/blocks/simple-text.blade.php: -------------------------------------------------------------------------------- 1 | @twillBlockTitle('Simple Text') 2 | @twillBlockIcon('text') 3 | @twillBlockGroup('app') 4 | 5 | @formField('input', [ 6 | 'name' => 'title', 7 | 'label' => 'Title', 8 | 'translated' => true, 9 | ]) 10 | 11 | @formField('wysiwyg', [ 12 | 'name' => 'text', 13 | 'label' => 'Text', 14 | 'placeholder' => 'Text', 15 | 'toolbarOptions' => [ 16 | 'bold', 17 | 'italic', 18 | ['list' => 'bullet'], 19 | ['list' => 'ordered'], 20 | [ 'script' => 'super' ], 21 | [ 'script' => 'sub' ], 22 | 'link', 23 | 'clean' 24 | ], 25 | 'translated' => true 26 | ]) 27 | -------------------------------------------------------------------------------- /resources/views/admin/blocks/text-with-image.blade.php: -------------------------------------------------------------------------------- 1 | @twillBlockTitle('Text With Image') 2 | @twillBlockIcon('text') 3 | @twillBlockGroup('app') 4 | 5 | @formField('medias', [ 6 | 'name' => 'content_square', 7 | 'label' => 'Image', 8 | ]) 9 | 10 | @formField('input', [ 11 | 'name' => 'title', 12 | 'label' => 'Title', 13 | 'translated' => true, 14 | ]) 15 | 16 | @formField('wysiwyg', [ 17 | 'name' => 'text', 18 | 'label' => 'Text', 19 | 'placeholder' => 'Text', 20 | 'toolbarOptions' => [ 21 | 'bold', 22 | 'italic', 23 | ['list' => 'bullet'], 24 | ['list' => 'ordered'], 25 | [ 'script' => 'super' ], 26 | [ 'script' => 'sub' ], 27 | ['header' => [2,3,4,5,6,false]], 28 | 'link', 29 | 'clean' 30 | ], 31 | 'translated' => true 32 | ]) 33 | -------------------------------------------------------------------------------- /resources/views/admin/example-page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('twill::layouts.free') 2 | @section('customPageContent') 3 | @livewireScripts 4 | @livewireStyles 5 | 6 | hello world! 7 | 8 | Below is a livewire component: 9 |
10 | 11 | @endsection 12 | 13 | -------------------------------------------------------------------------------- /resources/views/admin/repeaters/faq-item.blade.php: -------------------------------------------------------------------------------- 1 | @twillRepeaterTitle('Faq item') 2 | 3 | @formField('input', [ 4 | 'name' => 'title', 5 | 'label' => 'Title', 6 | 'translated' => true, 7 | ]) 8 | 9 | @formField('wysiwyg', [ 10 | 'name' => 'text', 11 | 'label' => 'Text', 12 | 'placeholder' => 'Text', 13 | 'toolbarOptions' => [ 14 | 'bold', 15 | 'italic', 16 | ['list' => 'bullet'], 17 | ['list' => 'ordered'], 18 | [ 'script' => 'super' ], 19 | [ 'script' => 'sub' ], 20 | 'link', 21 | 'clean' 22 | ], 23 | 'translated' => true 24 | ]) 25 | 26 | @formField('checkbox', [ 27 | 'name' => 'open', 28 | 'label' => 'Open by default' 29 | ]) 30 | 31 | @formField('input', [ 32 | 'name' => 'cta_text', 33 | 'label' => 'Call to action text', 34 | 'translated' => true, 35 | ]) 36 | 37 | @formField('browser', [ 38 | 'moduleName' => 'content.pages', 39 | 'name' => 'cta_target', 40 | 'label' => 'Call to action target', 41 | 'max' => 1, 42 | ]) 43 | -------------------------------------------------------------------------------- /resources/views/admin/repeaters/menu_item.blade.php: -------------------------------------------------------------------------------- 1 | @twillRepeaterTitle('Menu Item') 2 | @twillRepeaterTitleField('title', ['hidePrefix' => false]) 3 | 4 | @formField('input', [ 5 | 'name' => 'title', 6 | 'label' => 'Title', 7 | 'translated' => true, 8 | ]) 9 | 10 | @formField('radios', [ 11 | 'label' => 'Link Type', 12 | 'name' => 'destination', 13 | 'inline' => true, 14 | 'options' => [ 15 | [ 16 | 'value' => 'internal', 17 | 'label' => 'Internal' 18 | ], 19 | [ 20 | 'value' => 'external', 21 | 'label' => 'External' 22 | ], 23 | [ 24 | 'value' => 'homepage', 25 | 'label' => 'Homepage' 26 | ], 27 | ] 28 | ]) 29 | {{-- Show Browser field to select internal item --}} 30 | 31 | @formField('browser', [ 32 | 'label' => 'Link', 33 | 'max' => 1, 34 | 'name' => 'linkables', 35 | 'moduleName' => 'content.pages' 36 | ]) 37 | 38 | 39 | {{-- Show text field to enter url if an external link is selected --}} 40 | 41 | @formField('input', [ 42 | 'name' => 'url', 43 | 'label' => 'Url', 44 | 'translated' => true, 45 | ]) 46 | 47 | 48 | 49 | @formField('input', [ 50 | 'name' => 'anchor', 51 | 'label' => 'Anchor', 52 | 'prefix' => '#' 53 | ]) 54 | @formField('input', [ 55 | 'name' => 'query_string', 56 | 'label' => 'Query String', 57 | 'prefix' => '?' 58 | ]) 59 | @formField('input', [ 60 | 'name' => 'id_attribute', 61 | 'label' => 'HTML ID' 62 | ]) 63 | @formField('input', [ 64 | 'name' => 'class_attribute', 65 | 'label' => 'CSS Class(es)', 66 | 'note' => 'A space separated list of classes to be added to the item' 67 | ]) 68 | @formField('checkbox', [ 69 | 'name' => 'new_window', 70 | 'label' => 'Open link in a new tab/window' 71 | ]) 72 | 73 | -------------------------------------------------------------------------------- /resources/views/admin/settings/footer.blade.php: -------------------------------------------------------------------------------- 1 | @extends('twill::layouts.settings') 2 | 3 | @php 4 | $pageRepository = app(\App\Twill\Capsules\Pages\Repositories\PageRepository::class); 5 | 6 | $pages = $pageRepository->listAll()->map(function($label, $value) { 7 | return [ 8 | 'value' => $value, 9 | 'label' => $label, 10 | ]; 11 | })->values()->toArray(); 12 | 13 | @endphp 14 | 15 | @section('contentFields') 16 | @formField('wysiwyg', [ 17 | 'name' => 'text', 18 | 'label' => 'Left side content', 19 | 'placeholder' => 'Text', 20 | 'toolbarOptions' => [ 21 | 'bold', 22 | 'italic', 23 | ['list' => 'bullet'], 24 | ['list' => 'ordered'], 25 | [ 'script' => 'super' ], 26 | [ 'script' => 'sub' ], 27 | 'link', 28 | 'clean' 29 | ], 30 | 'translated' => true 31 | ]) 32 | 33 | @formField('input', [ 34 | 'name' => 'copyright_notice', 35 | 'label' => __('Copyright notice'), 36 | 'translated' => true, 37 | ]) 38 | @stop 39 | -------------------------------------------------------------------------------- /resources/views/admin/settings/pages.blade.php: -------------------------------------------------------------------------------- 1 | @extends('twill::layouts.settings') 2 | 3 | @php 4 | $pageRepository = app(\App\Twill\Capsules\Pages\Repositories\PageRepository::class); 5 | 6 | $pages = $pageRepository->listAll()->map(function($label, $value) { 7 | return [ 8 | 'value' => $value, 9 | 'label' => $label, 10 | ]; 11 | })->values()->toArray(); 12 | 13 | @endphp 14 | 15 | @section('contentFields') 16 | @formField('select', [ 17 | 'name' => 'homepage', 18 | 'label' => 'Homepage', 19 | 'options' => $pages 20 | ]) 21 | @formField('select', [ 22 | 'name' => 'privacy_policy', 23 | 'label' => 'Privacy policy', 24 | 'options' => $pages 25 | ]) 26 | @formField('select', [ 27 | 'name' => 'cookies', 28 | 'label' => 'Cookies', 29 | 'options' => $pages 30 | ]) 31 | @formField('select', [ 32 | 'name' => 'terms_and_conditions', 33 | 'label' => 'Terms and conditions', 34 | 'options' => $pages 35 | ]) 36 | @stop 37 | -------------------------------------------------------------------------------- /resources/views/components/footer.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | {!! get_config('text', 'footer') !!} 4 |
5 |
6 |
7 |
8 | {{get_config('copyright_notice', 'footer')}} 9 |
10 |
11 | 14 | 17 |
18 | @lang('Cookies') 19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /resources/views/components/site/menu.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | // Code for menus. 3 | // This is just hardcoded for now, but could be made into a select. 4 | $menuRepo = app()->make(\App\Twill\Capsules\Menus\Repositories\MenuRepository::class); 5 | /** @var \App\Twill\Capsules\Menus\Models\Menu $menu */ 6 | $menu = $menuRepo->first(); 7 | @endphp 8 |
9 |
10 | 11 | logo comes here 12 | 13 | 21 | @if ($menu) 22 | 29 | @endif 30 | 39 |
40 |
43 |
44 |
45 | 55 |
56 |
57 |
58 |
59 | -------------------------------------------------------------------------------- /resources/views/components/site/menu/item.blade.php: -------------------------------------------------------------------------------- 1 |
  • 5 | 17 | @if($content ?? false) 18 | 29 | @endif 30 |
  • 31 | -------------------------------------------------------------------------------- /resources/views/components/site/menu/mobile-item.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | 6 | {{$slot}} 7 | @if (($href ?? '#') !== '#') 8 | 9 | @endif 10 | 11 | @if($content ?? false) 12 |
    13 | {{$content}} 14 |
    15 | @endif 16 |
    17 | -------------------------------------------------------------------------------- /resources/views/components/success-alert.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | 5 |
    6 |
    7 |
    8 |

    9 | {{$message}} 10 |

    11 |
    12 |
    13 |
    14 |
    15 | -------------------------------------------------------------------------------- /resources/views/emails/contact-form-submission.blade.php: -------------------------------------------------------------------------------- 1 | Subject: {{ $title }}
    2 | From: {{ $email }}
    3 | Phone: {{ $phone_number }}
    4 | Message: {{ $content }}
    5 | -------------------------------------------------------------------------------- /resources/views/frontend/page.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ $seo->title }} 5 | 6 | 7 | 8 | @livewireStyles 9 | 10 | 11 |
    12 | 13 | {!! $item->renderBlocks(false) !!} 14 | 15 |
    16 | 17 | 18 | @livewireScripts 19 | 20 | 21 | -------------------------------------------------------------------------------- /resources/views/livewire/contact-form.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $inputClasses = 'w-full p-4 border border-darkblue-500'; 3 | $errorClasses = 'border-red-500 border'; 4 | @endphp 5 |
    6 | @if ($saved) 7 | 8 | @else 9 |
    10 |
    11 | 12 | 16 | @error('contactForm.email') 17 |
    {{ $message }}
    18 | @enderror 19 |
    20 |
    21 | 22 | 26 | @error('contactForm.phone_number') 27 |
    {{ $message }}
    28 | @enderror 29 |
    30 |
    31 | 32 | 36 | @error('contactForm.title') 37 |
    {{ $message }}
    38 | @enderror 39 |
    40 |
    41 | 42 | 46 | @error('contactForm.message') 47 |
    {{ $message }}
    48 | @enderror 49 |
    50 |
    51 | 54 |
    55 |
    56 | @endif 57 |
    58 | -------------------------------------------------------------------------------- /resources/views/livewire/example-livewire-component.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | The current count is: {{$count}} 3 | 4 | 5 |
    6 | -------------------------------------------------------------------------------- /resources/views/site/blocks/contact-form.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webisolv/base-twill-project/0b8f01565978a7f9c63d33aec02ca9d93baa9036/resources/views/site/blocks/contact-form.blade.php -------------------------------------------------------------------------------- /resources/views/site/blocks/faq-item.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    {{$block->translatedInput('title')}}

    4 | 5 |
    6 |
    9 | {!! $block->translatedInput('text') !!} 10 |
    11 |
    12 | -------------------------------------------------------------------------------- /resources/views/site/blocks/faq-list.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | /** @var \A17\Twill\Models\Block $block */ 3 | @endphp 4 |
    5 | @foreach($block->children as $child) 6 | @include('site.blocks.faq-item', ['block' => $child, 'background' => $block->input('background')]) 7 | @endforeach 8 |
    9 | -------------------------------------------------------------------------------- /resources/views/site/blocks/simple-text.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |

    {{ $block->translatedInput('title') }}

    3 | {!! $block->translatedInput('text') !!} 4 |
    5 | -------------------------------------------------------------------------------- /resources/views/site/blocks/text-with-image.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $image = $block->imageAsArray('content_square', 'desktop'); 3 | @endphp 4 |
    5 |
    6 | {{$image['alt']}} 7 |
    8 |
    9 |
    10 |

    {{$block->translatedInput('title')}}

    11 | {!! $block->translatedInput('text') !!} 12 |
    13 |
    14 | -------------------------------------------------------------------------------- /resources/views/site/layouts/block.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Preview 5 | 6 | 7 | 8 | @livewireStyles 9 | 10 | 11 |
    12 | @yield('content') 13 |
    14 | 15 | 16 | @livewireScripts 17 | 18 | 19 | -------------------------------------------------------------------------------- /routes/admin.php: -------------------------------------------------------------------------------- 1 | get('/customPage', [\App\Http\Controllers\Admin\ExampleController::class, 'index']); 4 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | LaravelLocalization::setLocale(), 'middleware' => ['localizationRedirect', 'localeSessionRedirect']], 19 | function () { 20 | Route::get('/', [PageDisplayController::class, 'landingPage'])->name('front.homepage'); 21 | 22 | Route::get('/{slug}', [PageDisplayController::class, 'displayPage'])->name('front.page'); 23 | } 24 | ); 25 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const colors = require('tailwindcss/colors'); 2 | 3 | module.exports = { 4 | purge: [ 5 | './resources/**/*.blade.php', 6 | './resources/**/*.js', 7 | './resources/**/*.vue', 8 | './app/Twill/Capsules/**/*.blade.php', 9 | ], 10 | darkMode: false, 11 | theme: { 12 | extend: { 13 | colors: { 14 | brown: { 15 | "50": "#fdfaf7", 16 | "100": "#fbf8f3", 17 | "200": "#f9f3eb", 18 | "300": "#f8f1e7", 19 | "400": "#f6ece0", 20 | "500": "#f4eadc", 21 | "600": "#dcb989", 22 | "700": "#c58b3a", 23 | "800": "#765323", 24 | "900": "#271c0c" 25 | }, 26 | darkblue: { 27 | "50": "#fcfcfd", 28 | "100": "#fcfcfd", 29 | "200": "#d9deed", 30 | "300": "#afbada", 31 | "400": "#7b8dc1", 32 | "500": "#253050", 33 | "600": "#2f3d65", 34 | "700": "#394979", 35 | "800": "#3c4d80", 36 | "900": "#43568e" 37 | }, 38 | accentRed: { 39 | "50": "#fffbfa", 40 | "100": "#fffbfa", 41 | "200": "#fce1df", 42 | "300": "#f8c0ba", 43 | "400": "#f49a90", 44 | "500": "#ed5b4a", 45 | "600": "#ea4633", 46 | "700": "#e32b17", 47 | "800": "#cc2715", 48 | "900": "#ab2111" 49 | } 50 | }, 51 | transitionProperty: {'height': 'height'}, 52 | typography: { 53 | light: { 54 | css: { 55 | color: '#f4eadc', 56 | strong: { 57 | color: '#f4eadc' 58 | } 59 | } 60 | } 61 | }, 62 | height: { 63 | "s-1/3": '33vh', 64 | }, 65 | minHeight: { 66 | "96": '24rem', 67 | } 68 | }, 69 | }, 70 | variants: { 71 | extend: { 72 | margin: ['group-hover'], 73 | padding: ['group-hover'], 74 | }, 75 | }, 76 | plugins: [ 77 | require('@tailwindcss/typography'), 78 | ], 79 | }; 80 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel applications. By default, we are compiling the CSS 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | 15 | mix.js("resources/js/app.js", "public/js") 16 | .postCss("resources/css/app.css", "public/css", [require("tailwindcss"),]); 17 | --------------------------------------------------------------------------------