├── .editorconfig ├── .env.example ├── .eslintignore ├── .eslintrc ├── .gitattributes ├── .gitignore ├── .prettierrc ├── LICENSE.md ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ └── ResetPasswordController.php │ │ ├── Controller.php │ │ ├── ReactController.php │ │ ├── VueController.php │ │ └── WelcomeController.php │ ├── Kernel.php │ └── Middleware │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── User.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ └── 2014_10_12_100000_create_password_resets_table.php └── seeds │ └── DatabaseSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── index.php ├── packages.json └── robots.txt ├── resources ├── assets │ ├── css │ │ └── app.css │ └── js │ │ ├── react │ │ ├── app.js │ │ ├── components │ │ │ ├── Home.js │ │ │ └── Packages.js │ │ ├── entry-client.js │ │ └── entry-server.js │ │ └── vue │ │ ├── app.js │ │ ├── components │ │ ├── App.vue │ │ ├── Home.vue │ │ └── Packages.vue │ │ ├── entry-client.js │ │ ├── entry-server.js │ │ ├── router.js │ │ └── store.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── layouts │ └── app.blade.php │ ├── react.blade.php │ ├── vue.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ ├── public │ │ └── .gitignore │ └── ssr │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.js ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php ├── webpack.mix.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at http://editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | indent_size = 4 9 | indent_style = space 10 | end_of_line = lf 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_LOG_LEVEL=debug 6 | APP_URL=http://localhost 7 | 8 | DB_CONNECTION=mysql 9 | DB_HOST=127.0.0.1 10 | DB_PORT=3306 11 | DB_DATABASE=homestead 12 | DB_USERNAME=homestead 13 | DB_PASSWORD=secret 14 | 15 | BROADCAST_DRIVER=log 16 | CACHE_DRIVER=file 17 | SESSION_DRIVER=file 18 | SESSION_LIFETIME=120 19 | QUEUE_DRIVER=sync 20 | 21 | REDIS_HOST=127.0.0.1 22 | REDIS_PASSWORD=null 23 | REDIS_PORT=6379 24 | 25 | MAIL_DRIVER=smtp 26 | MAIL_HOST=smtp.mailtrap.io 27 | MAIL_PORT=2525 28 | MAIL_USERNAME=null 29 | MAIL_PASSWORD=null 30 | MAIL_ENCRYPTION=null 31 | 32 | PUSHER_APP_ID= 33 | PUSHER_APP_KEY= 34 | PUSHER_APP_SECRET= 35 | PUSHER_APP_CLUSTER=mt1 36 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /resources/assets/js/reception 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "eslint:recommended", 4 | "plugin:vue/recommended", 5 | "plugin:react/recommended", 6 | "prettier" 7 | ], 8 | "parserOptions": { 9 | "ecmaVersion": 2017 10 | }, 11 | "env": { 12 | "browser": true, 13 | "node": true, 14 | "jest": true 15 | }, 16 | "rules": { 17 | "react/prop-types": "off", 18 | "vue/html-indent": ["error", 4] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | /.idea 3 | /.vagrant 4 | /node_modules 5 | /public/css 6 | /public/hot 7 | /public/js 8 | /public/storage 9 | /public/mix-manifest.json 10 | /storage/*.key 11 | /vendor 12 | Homestead.json 13 | Homestead.yaml 14 | npm-debug.log 15 | yarn-error.log 16 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "singleQuote": true, 4 | "tabWidth": 4, 5 | "trailingComma": "es5" 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Spatie bvba 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [](https://supportukrainenow.org) 3 | 4 | # Example implementations of our laravel-server-side rendering package 5 | 6 | This repo contains examples of server-side rendered JavaScript SPAs rendered in a Laravel application using our home grown [spatie/laravel-server-side-rendering](https://github.com/spatie/laravel-server-side-rendering) package. 7 | 8 | We've got a a `vue` + `vuex` + `vue-router` example and a very basic `react` + `react-router` example that will be expanded in the future. 9 | 10 | ![](https://user-images.githubusercontent.com/1561079/35285451-b79f4fa8-005d-11e8-9f16-174778271f0b.png) 11 | 12 | ## Support us 13 | 14 | [](https://spatie.be/github-ad-click/laravel-server-side-rendering-examples) 15 | 16 | We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us). 17 | 18 | We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards). 19 | 20 | ## Installation 21 | 22 | You can install the app locally like you'd install any other Laravel app. 23 | 24 | ```bash 25 | git clone git@github.com:spatie/laravel-server-side-rendering-examples.git 26 | composer install 27 | yarn 28 | yarn production 29 | ``` 30 | 31 | If you want to see server side rendering in action, set your `.env` file's `APP_ENV` key to `production`. 32 | 33 | ## Credits 34 | 35 | - [Sebastian De Deyne](https://github.com/sebastiandedeyne) 36 | - [All Contributors](../../contributors) 37 | 38 | ## License 39 | 40 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 41 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|string|max:255', 52 | 'email' => 'required|string|email|max:255|unique:users', 53 | 'password' => 'required|string|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return \App\User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | $this->getPackages(), 11 | ]); 12 | } 13 | 14 | private function getPackages() : array 15 | { 16 | $path = public_path('packages.json'); 17 | 18 | $contents = file_get_contents($path); 19 | 20 | return json_decode($contents, true); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Controllers/VueController.php: -------------------------------------------------------------------------------- 1 | $this->getPackages(), 11 | ]); 12 | } 13 | 14 | private function getPackages(): array 15 | { 16 | $path = public_path('packages.json'); 17 | 18 | $contents = file_get_contents($path); 19 | 20 | return json_decode($contents, true); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Controllers/WelcomeController.php: -------------------------------------------------------------------------------- 1 | [ 31 | \App\Http\Middleware\EncryptCookies::class, 32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 33 | \Illuminate\Session\Middleware\StartSession::class, 34 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 36 | \App\Http\Middleware\VerifyCsrfToken::class, 37 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 38 | ], 39 | 40 | 'api' => [ 41 | 'throttle:60,1', 42 | 'bindings', 43 | ], 44 | ]; 45 | 46 | /** 47 | * The application's route middleware. 48 | * 49 | * These middleware may be assigned to groups or used individually. 50 | * 51 | * @var array 52 | */ 53 | protected $routeMiddleware = [ 54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 59 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 60 | ]; 61 | } 62 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'FORWARDED', 24 | Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', 25 | Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', 26 | Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', 27 | Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.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 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=7.0.0", 9 | "fideloper/proxy": "~3.3", 10 | "laravel/framework": "5.5.*", 11 | "laravel/tinker": "~1.0", 12 | "spatie/laravel-server-side-rendering": "^0.2" 13 | }, 14 | "require-dev": { 15 | "filp/whoops": "~2.0", 16 | "fzaninotto/faker": "~1.4", 17 | "mockery/mockery": "~1.0", 18 | "phpunit/phpunit": "~6.0" 19 | }, 20 | "autoload": { 21 | "classmap": [ 22 | "database/seeds", 23 | "database/factories" 24 | ], 25 | "psr-4": { 26 | "App\\": "app/" 27 | } 28 | }, 29 | "autoload-dev": { 30 | "psr-4": { 31 | "Tests\\": "tests/" 32 | } 33 | }, 34 | "extra": { 35 | "laravel": { 36 | "dont-discover": [ 37 | ] 38 | } 39 | }, 40 | "scripts": { 41 | "post-root-package-install": [ 42 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 43 | ], 44 | "post-create-project-cmd": [ 45 | "@php artisan key:generate" 46 | ], 47 | "post-autoload-dump": [ 48 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 49 | "@php artisan package:discover" 50 | ] 51 | }, 52 | "config": { 53 | "preferred-install": "dist", 54 | "sort-packages": true, 55 | "optimize-autoloader": true 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Environment 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "environment" your application is currently 24 | | running in. This may determine how you prefer to configure various 25 | | services your application utilizes. Set this in your ".env" file. 26 | | 27 | */ 28 | 29 | 'env' => env('APP_ENV', 'production'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Debug Mode 34 | |-------------------------------------------------------------------------- 35 | | 36 | | When your application is in debug mode, detailed error messages with 37 | | stack traces will be shown on every error that occurs within your 38 | | application. If disabled, a simple generic error page is shown. 39 | | 40 | */ 41 | 42 | 'debug' => env('APP_DEBUG', false), 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application URL 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This URL is used by the console to properly generate URLs when using 50 | | the Artisan command line tool. You should set this to the root of 51 | | your application so that it is used when running Artisan tasks. 52 | | 53 | */ 54 | 55 | 'url' => env('APP_URL', 'http://localhost'), 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Timezone 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Here you may specify the default timezone for your application, which 63 | | will be used by the PHP date and date-time functions. We have gone 64 | | ahead and set this to a sensible default for you out of the box. 65 | | 66 | */ 67 | 68 | 'timezone' => 'UTC', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Application Locale Configuration 73 | |-------------------------------------------------------------------------- 74 | | 75 | | The application locale determines the default locale that will be used 76 | | by the translation service provider. You are free to set this value 77 | | to any of the locales which will be supported by the application. 78 | | 79 | */ 80 | 81 | 'locale' => 'en', 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Application Fallback Locale 86 | |-------------------------------------------------------------------------- 87 | | 88 | | The fallback locale determines the locale to use when the current one 89 | | is not available. You may change the value to correspond to any of 90 | | the language folders that are provided through your application. 91 | | 92 | */ 93 | 94 | 'fallback_locale' => 'en', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Encryption Key 99 | |-------------------------------------------------------------------------- 100 | | 101 | | This key is used by the Illuminate encrypter service and should be set 102 | | to a random, 32 character string, otherwise these encrypted strings 103 | | will not be safe. Please do this before deploying an application! 104 | | 105 | */ 106 | 107 | 'key' => env('APP_KEY'), 108 | 109 | 'cipher' => 'AES-256-CBC', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Logging Configuration 114 | |-------------------------------------------------------------------------- 115 | | 116 | | Here you may configure the log settings for your application. Out of 117 | | the box, Laravel uses the Monolog PHP logging library. This gives 118 | | you a variety of powerful log handlers / formatters to utilize. 119 | | 120 | | Available Settings: "single", "daily", "syslog", "errorlog" 121 | | 122 | */ 123 | 124 | 'log' => env('APP_LOG', 'single'), 125 | 126 | 'log_level' => env('APP_LOG_LEVEL', 'debug'), 127 | 128 | /* 129 | |-------------------------------------------------------------------------- 130 | | Autoloaded Service Providers 131 | |-------------------------------------------------------------------------- 132 | | 133 | | The service providers listed here will be automatically loaded on the 134 | | request to your application. Feel free to add your own services to 135 | | this array to grant expanded functionality to your applications. 136 | | 137 | */ 138 | 139 | 'providers' => [ 140 | 141 | /* 142 | * Laravel Framework Service Providers... 143 | */ 144 | Illuminate\Auth\AuthServiceProvider::class, 145 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 146 | Illuminate\Bus\BusServiceProvider::class, 147 | Illuminate\Cache\CacheServiceProvider::class, 148 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 149 | Illuminate\Cookie\CookieServiceProvider::class, 150 | Illuminate\Database\DatabaseServiceProvider::class, 151 | Illuminate\Encryption\EncryptionServiceProvider::class, 152 | Illuminate\Filesystem\FilesystemServiceProvider::class, 153 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 154 | Illuminate\Hashing\HashServiceProvider::class, 155 | Illuminate\Mail\MailServiceProvider::class, 156 | Illuminate\Notifications\NotificationServiceProvider::class, 157 | Illuminate\Pagination\PaginationServiceProvider::class, 158 | Illuminate\Pipeline\PipelineServiceProvider::class, 159 | Illuminate\Queue\QueueServiceProvider::class, 160 | Illuminate\Redis\RedisServiceProvider::class, 161 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 162 | Illuminate\Session\SessionServiceProvider::class, 163 | Illuminate\Translation\TranslationServiceProvider::class, 164 | Illuminate\Validation\ValidationServiceProvider::class, 165 | Illuminate\View\ViewServiceProvider::class, 166 | 167 | /* 168 | * Package Service Providers... 169 | */ 170 | 171 | /* 172 | * Application Service Providers... 173 | */ 174 | App\Providers\AppServiceProvider::class, 175 | App\Providers\AuthServiceProvider::class, 176 | // App\Providers\BroadcastServiceProvider::class, 177 | App\Providers\EventServiceProvider::class, 178 | App\Providers\RouteServiceProvider::class, 179 | 180 | ], 181 | 182 | /* 183 | |-------------------------------------------------------------------------- 184 | | Class Aliases 185 | |-------------------------------------------------------------------------- 186 | | 187 | | This array of class aliases will be registered when this application 188 | | is started. However, feel free to register as many as you wish as 189 | | the aliases are "lazy" loaded so they don't hinder performance. 190 | | 191 | */ 192 | 193 | 'aliases' => [ 194 | 195 | 'App' => Illuminate\Support\Facades\App::class, 196 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 197 | 'Auth' => Illuminate\Support\Facades\Auth::class, 198 | 'Blade' => Illuminate\Support\Facades\Blade::class, 199 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 200 | 'Bus' => Illuminate\Support\Facades\Bus::class, 201 | 'Cache' => Illuminate\Support\Facades\Cache::class, 202 | 'Config' => Illuminate\Support\Facades\Config::class, 203 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 204 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 205 | 'DB' => Illuminate\Support\Facades\DB::class, 206 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 207 | 'Event' => Illuminate\Support\Facades\Event::class, 208 | 'File' => Illuminate\Support\Facades\File::class, 209 | 'Gate' => Illuminate\Support\Facades\Gate::class, 210 | 'Hash' => Illuminate\Support\Facades\Hash::class, 211 | 'Lang' => Illuminate\Support\Facades\Lang::class, 212 | 'Log' => Illuminate\Support\Facades\Log::class, 213 | 'Mail' => Illuminate\Support\Facades\Mail::class, 214 | 'Notification' => Illuminate\Support\Facades\Notification::class, 215 | 'Password' => Illuminate\Support\Facades\Password::class, 216 | 'Queue' => Illuminate\Support\Facades\Queue::class, 217 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 218 | 'Redis' => Illuminate\Support\Facades\Redis::class, 219 | 'Request' => Illuminate\Support\Facades\Request::class, 220 | 'Response' => Illuminate\Support\Facades\Response::class, 221 | 'Route' => Illuminate\Support\Facades\Route::class, 222 | 'Schema' => Illuminate\Support\Facades\Schema::class, 223 | 'Session' => Illuminate\Support\Facades\Session::class, 224 | 'Storage' => Illuminate\Support\Facades\Storage::class, 225 | 'URL' => Illuminate\Support\Facades\URL::class, 226 | 'Validator' => Illuminate\Support\Facades\Validator::class, 227 | 'View' => Illuminate\Support\Facades\View::class, 228 | 229 | ], 230 | 231 | ]; 232 | -------------------------------------------------------------------------------- /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", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /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 | 'encrypted' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 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 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => env( 90 | 'CACHE_PREFIX', 91 | str_slug(env('APP_NAME', 'laravel'), '_').'_cache' 92 | ), 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'unix_socket' => env('DB_SOCKET', ''), 50 | 'charset' => 'utf8mb4', 51 | 'collation' => 'utf8mb4_unicode_ci', 52 | 'prefix' => '', 53 | 'strict' => true, 54 | 'engine' => null, 55 | ], 56 | 57 | 'pgsql' => [ 58 | 'driver' => 'pgsql', 59 | 'host' => env('DB_HOST', '127.0.0.1'), 60 | 'port' => env('DB_PORT', '5432'), 61 | 'database' => env('DB_DATABASE', 'forge'), 62 | 'username' => env('DB_USERNAME', 'forge'), 63 | 'password' => env('DB_PASSWORD', ''), 64 | 'charset' => 'utf8', 65 | 'prefix' => '', 66 | 'schema' => 'public', 67 | 'sslmode' => 'prefer', 68 | ], 69 | 70 | 'sqlsrv' => [ 71 | 'driver' => 'sqlsrv', 72 | 'host' => env('DB_HOST', 'localhost'), 73 | 'port' => env('DB_PORT', '1433'), 74 | 'database' => env('DB_DATABASE', 'forge'), 75 | 'username' => env('DB_USERNAME', 'forge'), 76 | 'password' => env('DB_PASSWORD', ''), 77 | 'charset' => 'utf8', 78 | 'prefix' => '', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'client' => 'predis', 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', '127.0.0.1'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => env('SQS_KEY', 'your-public-key'), 54 | 'secret' => env('SQS_SECRET', 'your-secret-key'), 55 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 56 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 57 | 'region' => env('SQS_REGION', 'us-east-1'), 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => env('SESSION_LIFETIME', 120), 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path('framework/sessions'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Cache Store 91 | |-------------------------------------------------------------------------- 92 | | 93 | | When using the "apc" or "memcached" session drivers, you may specify a 94 | | cache store that should be used for these sessions. This value must 95 | | correspond with one of the application's configured cache stores. 96 | | 97 | */ 98 | 99 | 'store' => null, 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Sweeping Lottery 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Some session drivers must manually sweep their storage location to get 107 | | rid of old sessions from storage. Here are the chances that it will 108 | | happen on a given request. By default, the odds are 2 out of 100. 109 | | 110 | */ 111 | 112 | 'lottery' => [2, 100], 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Name 117 | |-------------------------------------------------------------------------- 118 | | 119 | | Here you may change the name of the cookie used to identify a session 120 | | instance by ID. The name specified here will get used every time a 121 | | new session cookie is created by the framework for every driver. 122 | | 123 | */ 124 | 125 | 'cookie' => env( 126 | 'SESSION_COOKIE', 127 | str_slug(env('APP_NAME', 'laravel'), '_').'_session' 128 | ), 129 | 130 | /* 131 | |-------------------------------------------------------------------------- 132 | | Session Cookie Path 133 | |-------------------------------------------------------------------------- 134 | | 135 | | The session cookie path determines the path for which the cookie will 136 | | be regarded as available. Typically, this will be the root path of 137 | | your application but you are free to change this when necessary. 138 | | 139 | */ 140 | 141 | 'path' => '/', 142 | 143 | /* 144 | |-------------------------------------------------------------------------- 145 | | Session Cookie Domain 146 | |-------------------------------------------------------------------------- 147 | | 148 | | Here you may change the domain of the cookie used to identify a session 149 | | in your application. This will determine which domains the cookie is 150 | | available to in your application. A sensible default has been set. 151 | | 152 | */ 153 | 154 | 'domain' => env('SESSION_DOMAIN', null), 155 | 156 | /* 157 | |-------------------------------------------------------------------------- 158 | | HTTPS Only Cookies 159 | |-------------------------------------------------------------------------- 160 | | 161 | | By setting this option to true, session cookies will only be sent back 162 | | to the server if the browser has a HTTPS connection. This will keep 163 | | the cookie from being sent to you if it can not be done securely. 164 | | 165 | */ 166 | 167 | 'secure' => env('SESSION_SECURE_COOKIE', false), 168 | 169 | /* 170 | |-------------------------------------------------------------------------- 171 | | HTTP Access Only 172 | |-------------------------------------------------------------------------- 173 | | 174 | | Setting this value to true will prevent JavaScript from accessing the 175 | | value of the cookie and the cookie will only be accessible through 176 | | the HTTP protocol. You are free to modify this option if needed. 177 | | 178 | */ 179 | 180 | 'http_only' => true, 181 | 182 | /* 183 | |-------------------------------------------------------------------------- 184 | | Same-Site Cookies 185 | |-------------------------------------------------------------------------- 186 | | 187 | | This option determines how your cookies behave when cross-site requests 188 | | take place, and can be used to mitigate CSRF attacks. By default, we 189 | | do not enable this as other CSRF protection services are in place. 190 | | 191 | | Supported: "lax", "strict" 192 | | 193 | */ 194 | 195 | 'same_site' => null, 196 | 197 | ]; 198 | -------------------------------------------------------------------------------- /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' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker $faker) { 17 | return [ 18 | 'name' => $faker->name, 19 | 'email' => $faker->unique()->safeEmail, 20 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 21 | 'remember_token' => str_random(10), 22 | ]; 23 | }); 24 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password'); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('users'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /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/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 11 | "format": "prettier --write \"resources/assets/**/*.{css,js,vue}\"", 12 | "lint": "eslint resources/assets/js --fix --ext js,vue" 13 | }, 14 | "dependencies": { 15 | "axios": "^0.17.1", 16 | "babel-preset-react": "^6.24.1", 17 | "cross-env": "^5.1", 18 | "eslint": "^4.19.1", 19 | "eslint-config-prettier": "^2.9.0", 20 | "eslint-plugin-react": "^7.7.0", 21 | "eslint-plugin-vue": "^4.4.0", 22 | "glob-all": "^3.1.0", 23 | "laravel-mix": "^1.0", 24 | "lodash": "^4.17.4", 25 | "prettier": "^1.10.2", 26 | "purgecss-webpack-plugin": "^0.19.0", 27 | "react": "^16.2.0", 28 | "react-dom": "^16.2.0", 29 | "react-router-dom": "^4.2.2", 30 | "tailwindcss": "^0.5.1", 31 | "vue": "^2.5.7", 32 | "vue-router": "^3.0.1", 33 | "vue-server-renderer": "^2.5.13", 34 | "vuex": "^3.0.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 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 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spatie/laravel-server-side-rendering-examples/f876fcbc935a943ec3b82819cc4f9cbbeea6d4d5/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/packages.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "name": "temporary-directory", 5 | "description": "

A simple class to work with a temporary directory.<\/p>", 6 | "url": "https:\/\/github.com\/spatie\/temporary-directory", 7 | "documentation_url": null, 8 | "blogpost_url": null, 9 | "download_count": 335699, 10 | "type": "php" 11 | }, 12 | { 13 | "id": 2, 14 | "name": "laravel-mailable-test", 15 | "description": "

An artisan command to easily test mailables.<\/p>", 16 | "url": "https:\/\/github.com\/spatie\/laravel-mailable-test", 17 | "documentation_url": null, 18 | "blogpost_url": "https:\/\/murze.be\/2017\/01\/artisan-command-easily-test-mailables\/", 19 | "download_count": 4957, 20 | "type": "laravel" 21 | }, 22 | { 23 | "id": 3, 24 | "name": "twitter-streaming-api", 25 | "description": "

Easily work with the Twitter Streaming API in a Laravel app.<\/p>", 26 | "url": "https:\/\/github.com\/spatie\/laravel-twitter-streaming-api", 27 | "documentation_url": null, 28 | "blogpost_url": "https:\/\/murze.be\/2017\/01\/easily-work-with-the-twitter-streaming-api-in-php\/", 29 | "download_count": 6654, 30 | "type": "laravel" 31 | }, 32 | { 33 | "id": 4, 34 | "name": "twitter-streaming-api", 35 | "description": "

Easily work with the Twitter Streaming API.<\/p>", 36 | "url": "https:\/\/github.com\/spatie\/twitter-streaming-api", 37 | "documentation_url": null, 38 | "blogpost_url": "https:\/\/murze.be\/2017\/01\/easily-work-with-the-twitter-streaming-api-in-php\/", 39 | "download_count": 6654, 40 | "type": "php" 41 | }, 42 | { 43 | "id": 5, 44 | "name": "laravel-migrate-fresh", 45 | "description": "

An artisan command to build up a database from scratch.<\/p>", 46 | "url": "https:\/\/github.com\/spatie\/laravel-migrate-fresh", 47 | "documentation_url": null, 48 | "blogpost_url": "https:\/\/murze.be\/2017\/01\/laravel-package-rebuild-database\/", 49 | "download_count": 65058, 50 | "type": "laravel" 51 | }, 52 | { 53 | "id": 6, 54 | "name": "laravel-varnish", 55 | "description": "

Making Varnish and Laravel play nice together.<\/p>", 56 | "url": "https:\/\/github.com\/spatie\/laravel-varnish", 57 | "documentation_url": null, 58 | "blogpost_url": "https:\/\/murze.be\/2017\/01\/varnish-on-a-laravel-forge-server\/", 59 | "download_count": 2442, 60 | "type": "laravel" 61 | }, 62 | { 63 | "id": 7, 64 | "name": "uptime-monitor-app", 65 | "description": "

A PHP application to monitor uptime and ssl certificates.<\/p>", 66 | "url": "https:\/\/github.com\/spatie\/uptime-monitor-app", 67 | "documentation_url": null, 68 | "blogpost_url": "https:\/\/murze.be\/2016\/12\/an-easy-to-install-uptime-monitor\/", 69 | "download_count": 297, 70 | "type": "php" 71 | }, 72 | { 73 | "id": 8, 74 | "name": "fractalistic", 75 | "description": "

A developer friendly wrapper around Fractal.<\/p>", 76 | "url": "https:\/\/github.com\/spatie\/fractalistic", 77 | "documentation_url": null, 78 | "blogpost_url": "https:\/\/murze.be\/2016\/12\/developer-friendly-wrapper-around-fractal\/", 79 | "download_count": 352926, 80 | "type": "php" 81 | }, 82 | { 83 | "id": 9, 84 | "name": "schema-org", 85 | "description": "

A fluent builder Schema.org types and ld+json generator.<\/p>", 86 | "url": "https:\/\/github.com\/spatie\/schema-org", 87 | "documentation_url": null, 88 | "blogpost_url": "https:\/\/murze.be\/2016\/12\/package-fluently-generate-schema-org-markup\/", 89 | "download_count": 40207, 90 | "type": "php" 91 | }, 92 | { 93 | "id": 10, 94 | "name": "http-status-check", 95 | "description": "

A CLI tool to crawl a website and check HTTP status codes.<\/p>", 96 | "url": "https:\/\/github.com\/spatie\/laravel-uptime-monitor", 97 | "documentation_url": null, 98 | "blogpost_url": "https:\/\/murze.be\/2015\/11\/building-a-crawler-in-php\/", 99 | "download_count": 2043, 100 | "type": "php" 101 | }, 102 | { 103 | "id": 11, 104 | "name": "laravel-uptime-monitor", 105 | "description": "

A powerful and easy to configure uptime and ssl monitor.<\/p>", 106 | "url": "https:\/\/github.com\/spatie\/laravel-uptime-monitor", 107 | "documentation_url": "https:\/\/docs.spatie.be\/laravel-uptime-monitor", 108 | "blogpost_url": "https:\/\/murze.be\/2016\/11\/an-uptime-and-ssl-certificate-monitor-written-in-php\/", 109 | "download_count": 7576, 110 | "type": "laravel" 111 | }, 112 | { 113 | "id": 12, 114 | "name": "vue-save-state", 115 | "description": "

A Vue mixin to save the state of a component to local storage.<\/p>", 116 | "url": "https:\/\/github.com\/spatie\/vue-save-state", 117 | "documentation_url": null, 118 | "blogpost_url": null, 119 | "download_count": null, 120 | "type": "javascript" 121 | }, 122 | { 123 | "id": 13, 124 | "name": "once", 125 | "description": "

A magic memoization function.<\/p>", 126 | "url": "https:\/\/github.com\/spatie\/once", 127 | "documentation_url": null, 128 | "blogpost_url": "https:\/\/murze.be\/2016\/11\/magic-memoization-function\/", 129 | "download_count": 947, 130 | "type": "php" 131 | }, 132 | { 133 | "id": 14, 134 | "name": "laravel-tags", 135 | "description": "

A powerful tagging package. Batteries included.<\/p>", 136 | "url": "https:\/\/github.com\/spatie\/laravel-tags", 137 | "documentation_url": "https:\/\/docs.spatie.be\/laravel-tags\/v1\/introduction", 138 | "blogpost_url": "https:\/\/murze.be\/2016\/10\/laravel-tags\/", 139 | "download_count": 40180, 140 | "type": "laravel" 141 | }, 142 | { 143 | "id": 15, 144 | "name": "laravel-missing-page-redirector", 145 | "description": "

Retain your SEO value when moving sites by using proper redirects.<\/p>", 146 | "url": "https:\/\/github.com\/spatie\/laravel-missing-page-redirector", 147 | "documentation_url": null, 148 | "blogpost_url": "https:\/\/murze.be\/2016\/10\/redirect-missing-pages-in-your-laravel-application\/", 149 | "download_count": 14942, 150 | "type": "laravel" 151 | }, 152 | { 153 | "id": 16, 154 | "name": "url", 155 | "description": "

Parse, build and manipulate URLs<\/p>", 156 | "url": "https:\/\/github.com\/spatie\/url", 157 | "documentation_url": null, 158 | "blogpost_url": "https:\/\/murze.be\/2016\/10\/class-parse-build-manipulate-urls\/", 159 | "download_count": 64025, 160 | "type": "php" 161 | }, 162 | { 163 | "id": 17, 164 | "name": "laravel-translation-loader", 165 | "description": "

Store your translation in the database or other sources.<\/p>", 166 | "url": "https:\/\/github.com\/spatie\/laravel-translation-loader", 167 | "documentation_url": null, 168 | "blogpost_url": "https:\/\/murze.be\/2016\/10\/laravel-package-store-language-lines-database\/", 169 | "download_count": 10257, 170 | "type": "laravel" 171 | }, 172 | { 173 | "id": 18, 174 | "name": "opening-hours", 175 | "description": "

A helper to query and format a set of opening hours.<\/p>", 176 | "url": "https:\/\/github.com\/spatie\/opening-hours", 177 | "documentation_url": null, 178 | "blogpost_url": "https:\/\/murze.be\/2016\/10\/managing-opening-hours-php\/", 179 | "download_count": 21101, 180 | "type": "php" 181 | }, 182 | { 183 | "id": 19, 184 | "name": "color", 185 | "description": "

A little library to deal with color conversions.<\/p>", 186 | "url": "https:\/\/github.com\/spatie\/color", 187 | "documentation_url": null, 188 | "blogpost_url": null, 189 | "download_count": 7264, 190 | "type": "php" 191 | }, 192 | { 193 | "id": 20, 194 | "name": "laravel-sitemap", 195 | "description": "

Create and generate sitemaps with ease.<\/p>", 196 | "url": "https:\/\/github.com\/spatie\/laravel-sitemap", 197 | "documentation_url": null, 198 | "blogpost_url": "https:\/\/murze.be\/2016\/08\/automatically-generate-a-sitemap-in-laravel\/", 199 | "download_count": 48260, 200 | "type": "laravel" 201 | }, 202 | { 203 | "id": 21, 204 | "name": "regex", 205 | "description": "

Making regex great again.<\/p>", 206 | "url": "https:\/\/github.com\/spatie\/regex", 207 | "documentation_url": null, 208 | "blogpost_url": "https:\/\/murze.be\/2016\/08\/package-easily-work-regex-php\/", 209 | "download_count": 31535, 210 | "type": "php" 211 | }, 212 | { 213 | "id": 22, 214 | "name": "laravel-collection-macros", 215 | "description": "

A set of useful Laravel collection macros.<\/p>", 216 | "url": "https:\/\/github.com\/spatie\/laravel-collection-macros", 217 | "documentation_url": null, 218 | "blogpost_url": "https:\/\/murze.be\/2016\/08\/handy-collection-macros", 219 | "download_count": 37301, 220 | "type": "laravel" 221 | }, 222 | { 223 | "id": 23, 224 | "name": "ssl-certificate", 225 | "description": "

Validate SSL certificates.<\/p>", 226 | "url": "https:\/\/github.com\/spatie\/ssl-certificate", 227 | "documentation_url": null, 228 | "blogpost_url": "https:\/\/murze.be\/2016\/07\/validating-ssl-certificates-php\/", 229 | "download_count": 18837, 230 | "type": "php" 231 | }, 232 | { 233 | "id": 24, 234 | "name": "laravel-slack-slash-command", 235 | "description": "

Make a Laravel app respond to a slash command from Slack.<\/p>", 236 | "url": "https:\/\/github.com\/spatie\/laravel-slack-slash-command", 237 | "documentation_url": "https:\/\/docs.spatie.be\/laravel-slack-slash-command", 238 | "blogpost_url": "https:\/\/murze.be\/2016\/07\/building-a-slack-bot-with-laravel\/", 239 | "download_count": 11729, 240 | "type": "laravel" 241 | }, 242 | { 243 | "id": 25, 244 | "name": "laravel-cookie-consent", 245 | "description": "

Make your Laravel app comply with the EU cookie law.<\/p>", 246 | "url": "https:\/\/github.com\/spatie\/laravel-cookie-consent", 247 | "documentation_url": null, 248 | "blogpost_url": "https:\/\/murze.be\/2016\/06\/make-laravel-app-comply-crazy-eu-cookie-law\/", 249 | "download_count": 49462, 250 | "type": "laravel" 251 | }, 252 | { 253 | "id": 26, 254 | "name": "laravel-blade-javascript", 255 | "description": "

A Blade directive to export PHP variables to JavaScript.<\/p>", 256 | "url": "https:\/\/github.com\/spatie\/laravel-blade-javascript", 257 | "documentation_url": null, 258 | "blogpost_url": "https:\/\/murze.be\/2016\/06\/laravel-package-export-php-variables-javascript\/", 259 | "download_count": 43905, 260 | "type": "laravel" 261 | }, 262 | { 263 | "id": 27, 264 | "name": "laravel-google-calendar", 265 | "description": "

Manage events on a Google Calendar.<\/p>", 266 | "url": "https:\/\/github.com\/spatie\/laravel-google-calendar", 267 | "documentation_url": null, 268 | "blogpost_url": "https:\/\/murze.be\/2016\/05\/package-manage-events-google-calendar\/", 269 | "download_count": 23541, 270 | "type": "laravel" 271 | }, 272 | { 273 | "id": 28, 274 | "name": "last-fm-now-playing", 275 | "description": "

Get the info of a track that user is currently playing.<\/p>", 276 | "url": "https:\/\/github.com\/spatie\/last-fm-now-playing", 277 | "documentation_url": null, 278 | "blogpost_url": "https:\/\/murze.be\/2016\/05\/package-determine-track-user-playing\/", 279 | "download_count": 3308, 280 | "type": "php" 281 | }, 282 | { 283 | "id": 29, 284 | "name": "packagist-api", 285 | "description": "

The easiest way to work with the packagist API.<\/p>", 286 | "url": "https:\/\/github.com\/spatie\/packagist-api", 287 | "documentation_url": null, 288 | "blogpost_url": "https:\/\/murze.be\/2016\/05\/getting-package-statistics-packagist\/", 289 | "download_count": 3760, 290 | "type": "php" 291 | }, 292 | { 293 | "id": 30, 294 | "name": "laravel-directory-cleanup", 295 | "description": "

Clean up old files in specified directories.<\/p>", 296 | "url": "https:\/\/github.com\/spatie\/laravel-directory-cleanup", 297 | "documentation_url": null, 298 | "blogpost_url": null, 299 | "download_count": 12122, 300 | "type": "laravel" 301 | }, 302 | { 303 | "id": 31, 304 | "name": "laravel-translatable", 305 | "description": "

Make your Eloquent models multilingual.<\/p>", 306 | "url": "https:\/\/github.com\/spatie\/laravel-translatable", 307 | "documentation_url": null, 308 | "blogpost_url": "https:\/\/murze.be\/2016\/04\/making-eloquent-models-translatable\/", 309 | "download_count": 84472, 310 | "type": "laravel" 311 | }, 312 | { 313 | "id": 32, 314 | "name": "valuestore", 315 | "description": "

Easily store some loose values.<\/p>", 316 | "url": "https:\/\/github.com\/spatie\/valuestore", 317 | "documentation_url": null, 318 | "blogpost_url": "https:\/\/murze.be\/2016\/04\/easily-store-some-values\/", 319 | "download_count": 4753, 320 | "type": "php" 321 | }, 322 | { 323 | "id": 33, 324 | "name": "laravel-demo-mode", 325 | "description": "

Protect your work in progress from prying eyes.<\/p>", 326 | "url": "https:\/\/github.com\/spatie\/laravel-demo-mode", 327 | "documentation_url": null, 328 | "blogpost_url": "https:\/\/murze.be\/2016\/03\/package-protect-work-progress-prying-eyes\/", 329 | "download_count": 10632, 330 | "type": "laravel" 331 | }, 332 | { 333 | "id": 34, 334 | "name": "laravel-menu", 335 | "description": "

Html menu generator for Laravel.<\/p>", 336 | "url": "https:\/\/github.com\/spatie\/laravel-menu", 337 | "documentation_url": "http:\/\/docs.spatie.be\/menu", 338 | "blogpost_url": "https:\/\/murze.be\/2016\/03\/a-modern-package-to-generate-menus\/", 339 | "download_count": 43036, 340 | "type": "laravel" 341 | }, 342 | { 343 | "id": 35, 344 | "name": "menu", 345 | "description": "

Html menu generator.<\/p>", 346 | "url": "https:\/\/github.com\/spatie\/menu", 347 | "documentation_url": "http:\/\/docs.spatie.be\/menu", 348 | "blogpost_url": "https:\/\/murze.be\/2016\/03\/a-modern-package-to-generate-menus\/", 349 | "download_count": 47606, 350 | "type": "php" 351 | }, 352 | { 353 | "id": 36, 354 | "name": "html-element", 355 | "description": "

Html rendering in php inspired by hyperscript.<\/p>", 356 | "url": "https:\/\/github.com\/spatie\/html-element", 357 | "documentation_url": null, 358 | "blogpost_url": null, 359 | "download_count": 29453, 360 | "type": "php" 361 | }, 362 | { 363 | "id": 37, 364 | "name": "laravel-model-cleanup", 365 | "description": "

Clean up expired records from Eloquent models.<\/p>", 366 | "url": "https:\/\/github.com\/spatie\/laravel-model-cleanup", 367 | "documentation_url": null, 368 | "blogpost_url": "https:\/\/murze.be\/2016\/03\/package-clean-models\/", 369 | "download_count": 8285, 370 | "type": "laravel" 371 | }, 372 | { 373 | "id": 38, 374 | "name": "laravel-feed", 375 | "description": "

Easily generate RSS feeds.<\/p>", 376 | "url": "https:\/\/github.com\/spatie\/laravel-feed", 377 | "documentation_url": null, 378 | "blogpost_url": "https:\/\/murze.be\/2016\/03\/a-package-to-easily-generate-feeds-in-laravel\/", 379 | "download_count": 13789, 380 | "type": "laravel" 381 | }, 382 | { 383 | "id": 39, 384 | "name": "laravel-failed-job-monitor", 385 | "description": "

Get notified when a queued job fails.<\/p>", 386 | "url": "https:\/\/github.com\/spatie\/laravel-failed-job-monitor", 387 | "documentation_url": null, 388 | "blogpost_url": "https:\/\/murze.be\/2016\/02\/get-notified-when-a-queued-job-fails\/", 389 | "download_count": 69047, 390 | "type": "laravel" 391 | }, 392 | { 393 | "id": 40, 394 | "name": "emoji", 395 | "description": "

Easily display emoji characters.<\/p>", 396 | "url": "https:\/\/github.com\/spatie\/emoji", 397 | "documentation_url": null, 398 | "blogpost_url": "https:\/\/murze.be\/2016\/02\/using-emoji-in-php\/", 399 | "download_count": 25900, 400 | "type": "php" 401 | }, 402 | { 403 | "id": 41, 404 | "name": "db-dumper", 405 | "description": "

Dump the contents of a database to a file.<\/p>", 406 | "url": "https:\/\/github.com\/spatie\/db-dumper", 407 | "documentation_url": null, 408 | "blogpost_url": "https:\/\/murze.be\/2016\/02\/a-package-to-dump-your-database\/", 409 | "download_count": 552570, 410 | "type": "php" 411 | }, 412 | { 413 | "id": 42, 414 | "name": "yaml-front-matter", 415 | "description": "

A to the point yaml front matter parser.<\/p>", 416 | "url": "https:\/\/github.com\/spatie\/yaml-front-matter", 417 | "documentation_url": null, 418 | "blogpost_url": null, 419 | "download_count": 1215, 420 | "type": "php" 421 | }, 422 | { 423 | "id": 43, 424 | "name": "laravel-robots-middleware", 425 | "description": "

Enable or disable the indexing of your app.<\/p>", 426 | "url": "https:\/\/github.com\/spatie\/laravel-robots-middleware", 427 | "documentation_url": null, 428 | "blogpost_url": "https:\/\/murze.be\/2016\/01\/say-goodbye-to-manually-creating-a-robots-txt-file\/", 429 | "download_count": 28998, 430 | "type": "laravel" 431 | }, 432 | { 433 | "id": 44, 434 | "name": "pdf-to-text", 435 | "description": "

Extract text from a pdf.<\/p>", 436 | "url": "https:\/\/github.com\/spatie\/pdf-to-text", 437 | "documentation_url": null, 438 | "blogpost_url": "https:\/\/murze.be\/2016\/01\/a-package-to-extract-text-from-a-pdf\/", 439 | "download_count": 18753, 440 | "type": "php" 441 | }, 442 | { 443 | "id": 45, 444 | "name": "laravel-sluggable", 445 | "description": "

Generate slugs when saving Eloquent models.<\/p>", 446 | "url": "https:\/\/github.com\/spatie\/laravel-sluggable", 447 | "documentation_url": null, 448 | "blogpost_url": "https:\/\/murze.be\/2015\/12\/a-php-7-laravel-package-to-create-slugs\/", 449 | "download_count": 59286, 450 | "type": "laravel" 451 | }, 452 | { 453 | "id": 46, 454 | "name": "laravel-link-checker", 455 | "description": "

Check if all links in your app work.<\/p>", 456 | "url": "https:\/\/github.com\/spatie\/laravel-link-checker", 457 | "documentation_url": null, 458 | "blogpost_url": null, 459 | "download_count": 11747, 460 | "type": "laravel" 461 | }, 462 | { 463 | "id": 47, 464 | "name": "npm-install-peers", 465 | "description": "

CLI command to install npm peerDependencies.<\/p>", 466 | "url": "https:\/\/github.com\/spatie\/npm-install-peers", 467 | "documentation_url": null, 468 | "blogpost_url": null, 469 | "download_count": null, 470 | "type": "javascript" 471 | }, 472 | { 473 | "id": 48, 474 | "name": "emits-change", 475 | "description": "

Plug-and-play node.js events integration to emit change events.<\/p>", 476 | "url": "https:\/\/github.com\/spatie\/emits-change", 477 | "documentation_url": null, 478 | "blogpost_url": null, 479 | "download_count": null, 480 | "type": "javascript" 481 | }, 482 | { 483 | "id": 49, 484 | "name": "viewport-utility", 485 | "description": "

Front-end utility that updates DOM classes and JS properties for easy access in scripts and stylesheets.<\/p>", 486 | "url": "https:\/\/github.com\/spatie\/viewport-utility", 487 | "documentation_url": null, 488 | "blogpost_url": null, 489 | "download_count": null, 490 | "type": "javascript" 491 | }, 492 | { 493 | "id": 50, 494 | "name": "crawler", 495 | "description": "

A class to crawl all links found on a website.<\/p>", 496 | "url": "https:\/\/github.com\/spatie\/crawler", 497 | "documentation_url": null, 498 | "blogpost_url": "https:\/\/murze.be\/2015\/11\/building-a-crawler-in-php\/", 499 | "download_count": 68436, 500 | "type": "php" 501 | }, 502 | { 503 | "id": 51, 504 | "name": "laravel-pjax", 505 | "description": "

A pjax middleware for Laravel 5.<\/p>", 506 | "url": "https:\/\/github.com\/spatie\/laravel-pjax", 507 | "documentation_url": null, 508 | "blogpost_url": "https:\/\/murze.be\/2015\/10\/a-pjax-middleware-for-laravel-5\/", 509 | "download_count": 70265, 510 | "type": "laravel" 511 | }, 512 | { 513 | "id": 52, 514 | "name": "laravel-fractal", 515 | "description": "

A Fractal service provider for Laravel 5 and Lumen.<\/p>", 516 | "url": "https:\/\/github.com\/spatie\/laravel-fractal", 517 | "documentation_url": null, 518 | "blogpost_url": "https:\/\/murze.be\/2015\/10\/a-fractal-service-provider-for-laravel\/", 519 | "download_count": 574407, 520 | "type": "laravel" 521 | }, 522 | { 523 | "id": 53, 524 | "name": "laravel-authorize", 525 | "description": "

A middleware to check authorization.<\/p>", 526 | "url": "https:\/\/github.com\/spatie\/laravel-authorize", 527 | "documentation_url": null, 528 | "blogpost_url": null, 529 | "download_count": 8769, 530 | "type": "laravel" 531 | }, 532 | { 533 | "id": 54, 534 | "name": "laravel-permission", 535 | "description": "

Associate users with roles and permissions.<\/p>", 536 | "url": "https:\/\/github.com\/spatie\/laravel-permission", 537 | "documentation_url": null, 538 | "blogpost_url": "https:\/\/murze.be\/2015\/09\/a-package-to-add-roles-and-permissions-to-laravel\/", 539 | "download_count": 482789, 540 | "type": "laravel" 541 | }, 542 | { 543 | "id": 55, 544 | "name": "laravel-url-signer", 545 | "description": "

Create and validate signed URLs with a limited lifetime.<\/p>", 546 | "url": "https:\/\/github.com\/spatie\/laravel-url-signer", 547 | "documentation_url": null, 548 | "blogpost_url": "https:\/\/murze.be\/2015\/08\/url-signing-in-laravel\/", 549 | "download_count": 50973, 550 | "type": "laravel" 551 | }, 552 | { 553 | "id": 56, 554 | "name": "url-signer", 555 | "description": "

Creates and validate signed URLs with a limited lifetime.<\/p>", 556 | "url": "https:\/\/github.com\/spatie\/url-signer", 557 | "documentation_url": null, 558 | "blogpost_url": null, 559 | "download_count": 54545, 560 | "type": "php" 561 | }, 562 | { 563 | "id": 57, 564 | "name": "laravel-backup", 565 | "description": "

Backup your application and database to any filesystem you like.<\/p>", 566 | "url": "https:\/\/github.com\/spatie\/laravel-backup", 567 | "documentation_url": "https:\/\/docs.spatie.be\/laravel-backup", 568 | "blogpost_url": "https:\/\/murze.be\/2016\/09\/taking-care-of-backups-with-laravel\/", 569 | "download_count": 660714, 570 | "type": "laravel" 571 | }, 572 | { 573 | "id": 58, 574 | "name": "laravel-medialibrary", 575 | "description": "

Associate files with Eloquent models. Additionally the package can create image\n manipulations on images and pdfs that have been added in the medialibrary.<\/p>", 576 | "url": "https:\/\/github.com\/spatie\/laravel-medialibrary", 577 | "documentation_url": "https:\/\/docs.spatie.be\/laravel-medialibrary", 578 | "blogpost_url": null, 579 | "download_count": 351429, 580 | "type": "laravel" 581 | }, 582 | { 583 | "id": 59, 584 | "name": "laravel-newsletter", 585 | "description": "

Subscribe users to MailChimp newsletters.<\/p>", 586 | "url": "https:\/\/github.com\/spatie\/laravel-newsletter", 587 | "documentation_url": null, 588 | "blogpost_url": "https:\/\/murze.be\/2016\/04\/easily-integrate-mailchimp-laravel-5\/", 589 | "download_count": 279009, 590 | "type": "laravel" 591 | }, 592 | { 593 | "id": 60, 594 | "name": "laravel-responsecache", 595 | "description": "

Improve the performance of your app by caching the entire response.", 596 | "url": "https:\/\/github.com\/spatie\/laravel-responsecache", 597 | "documentation_url": null, 598 | "blogpost_url": "https:\/\/murze.be\/2015\/07\/speed-up-a-laravel-app-by-caching-the-entire-response\/", 599 | "download_count": 77186, 600 | "type": "laravel" 601 | }, 602 | { 603 | "id": 61, 604 | "name": "laravel-paginateroute", 605 | "description": "

Generate pretty url's for paginated pages.<\/p>", 606 | "url": "https:\/\/github.com\/spatie\/laravel-paginateroute", 607 | "documentation_url": null, 608 | "blogpost_url": null, 609 | "download_count": 15291, 610 | "type": "laravel" 611 | }, 612 | { 613 | "id": 62, 614 | "name": "laravel-glide", 615 | "description": "

Integrate Glide<\/a> with Laravel.<\/p>", 616 | "url": "https:\/\/github.com\/spatie\/laravel-glide", 617 | "documentation_url": null, 618 | "blogpost_url": null, 619 | "download_count": 240016, 620 | "type": "laravel" 621 | }, 622 | { 623 | "id": 63, 624 | "name": "pdf-to-image", 625 | "description": "

Convert pdf's to images.<\/p>", 626 | "url": "https:\/\/github.com\/spatie\/pdf-to-image", 627 | "documentation_url": null, 628 | "blogpost_url": null, 629 | "download_count": 415077, 630 | "type": "php" 631 | }, 632 | { 633 | "id": 64, 634 | "name": "laravel-analytics", 635 | "description": "

Fetch data from Google Analytics.<\/p>", 636 | "url": "https:\/\/github.com\/spatie\/laravel-analytics", 637 | "documentation_url": null, 638 | "blogpost_url": "https:\/\/murze.be\/2016\/06\/retrieve-google-analytics-date-laravel\/", 639 | "download_count": 256500, 640 | "type": "laravel" 641 | }, 642 | { 643 | "id": 65, 644 | "name": "laravel-googletagmanager", 645 | "description": "

Integrate Google Tag Manager<\/a> with your Laravel app.<\/p>", 646 | "url": "https:\/\/github.com\/spatie\/laravel-googletagmanager", 647 | "documentation_url": null, 648 | "blogpost_url": null, 649 | "download_count": 122207, 650 | "type": "laravel" 651 | }, 652 | { 653 | "id": 66, 654 | "name": "laravel-littlegatekeeper", 655 | "description": "

Protect pages with a universal username\/password combination.<\/p>", 656 | "url": "https:\/\/github.com\/spatie\/laravel-littlegatekeeper", 657 | "documentation_url": null, 658 | "blogpost_url": null, 659 | "download_count": 214, 660 | "type": "laravel" 661 | }, 662 | { 663 | "id": 67, 664 | "name": "geocoder", 665 | "description": "

Convert addresses to coordinates.<\/p>", 666 | "url": "https:\/\/github.com\/spatie\/geocoder", 667 | "documentation_url": null, 668 | "blogpost_url": null, 669 | "download_count": 21420, 670 | "type": "php" 671 | }, 672 | { 673 | "id": 68, 674 | "name": "string", 675 | "description": "

A collection of useful string functions.<\/p>", 676 | "url": "https:\/\/github.com\/spatie\/string", 677 | "documentation_url": null, 678 | "blogpost_url": null, 679 | "download_count": 477186, 680 | "type": "php" 681 | }, 682 | { 683 | "id": 69, 684 | "name": "laravel-activitylog", 685 | "description": "

Log the activities of your users.<\/p>", 686 | "url": "https:\/\/github.com\/spatie\/laravel-activitylog", 687 | "documentation_url": "http:\/\/docs.spatie.be\/laravel-activitylog", 688 | "blogpost_url": "https:\/\/murze.be\/2016\/06\/package-log-activity-laravel-app\/", 689 | "download_count": 277109, 690 | "type": "laravel" 691 | }, 692 | { 693 | "id": 70, 694 | "name": "laravel-partialcache", 695 | "description": "

A Blade directive to cache view partials.<\/p>", 696 | "url": "https:\/\/github.com\/spatie\/laravel-partialcache", 697 | "documentation_url": null, 698 | "blogpost_url": null, 699 | "download_count": 35054, 700 | "type": "laravel" 701 | }, 702 | { 703 | "id": 71, 704 | "name": "laravel-or-abort", 705 | "description": "

A trait to add abortable behaviour to any class.<\/p>", 706 | "url": "https:\/\/github.com\/spatie\/laravel-or-abort", 707 | "documentation_url": null, 708 | "blogpost_url": null, 709 | "download_count": 2935, 710 | "type": "laravel" 711 | }, 712 | { 713 | "id": 72, 714 | "name": "array-functions", 715 | "description": "

A collection of handy array functions.<\/p>", 716 | "url": "https:\/\/github.com\/spatie\/array-functions", 717 | "documentation_url": null, 718 | "blogpost_url": null, 719 | "download_count": 7309, 720 | "type": "php" 721 | }, 722 | { 723 | "id": 73, 724 | "name": "browsershot", 725 | "description": "

Convert a webpage to an image.<\/p>", 726 | "url": "https:\/\/github.com\/spatie\/browsershot", 727 | "documentation_url": null, 728 | "blogpost_url": "https:\/\/murze.be\/2017\/07\/easily-covert-webpages-to-images-using-php\/", 729 | "download_count": 55541, 730 | "type": "php" 731 | }, 732 | { 733 | "id": 74, 734 | "name": "eloquent-sortable", 735 | "description": "

Add sortable behaviour to Eloquent models.<\/p>", 736 | "url": "https:\/\/github.com\/spatie\/eloquent-sortable", 737 | "documentation_url": null, 738 | "blogpost_url": null, 739 | "download_count": 102374, 740 | "type": "laravel" 741 | }, 742 | { 743 | "id": 75, 744 | "name": "laravel-tail", 745 | "description": "

The tail command was removed from Laravel 5. Millions cried. This\n package brings it back!<\/p>", 746 | "url": "https:\/\/github.com\/spatie\/laravel-tail", 747 | "documentation_url": null, 748 | "blogpost_url": null, 749 | "download_count": 177218, 750 | "type": "laravel" 751 | }, 752 | { 753 | "id": 76, 754 | "name": "ssl-certificate-chain-resolver", 755 | "description": "

Fetch the entire trust chain for an ssl certificate.<\/p>", 756 | "url": "https:\/\/github.com\/spatie\/ssl-certificate-chain-resolver", 757 | "documentation_url": null, 758 | "blogpost_url": null, 759 | "download_count": 568, 760 | "type": "php" 761 | }, 762 | { 763 | "id": 77, 764 | "name": "laravel-referer", 765 | "description": "

Remember a visitor's original referer.<\/p>", 766 | "url": "https:\/\/github.com\/spatie\/laravel-referer", 767 | "documentation_url": "https:\/\/murze.be\/2017\/02\/package-remember-visitors-original-referer\/", 768 | "blogpost_url": null, 769 | "download_count": 4144, 770 | "type": "laravel" 771 | }, 772 | { 773 | "id": 78, 774 | "name": "image", 775 | "description": "

Manipulate images with an expressive API<\/p>", 776 | "url": "https:\/\/github.com\/spatie\/image", 777 | "documentation_url": "https:\/\/docs.spatie.be\/image\/v1\/introduction", 778 | "blogpost_url": "https:\/\/murze.be\/2017\/02\/package-easily-manipulate-images-php\/", 779 | "download_count": 161397, 780 | "type": "php" 781 | }, 782 | { 783 | "id": 79, 784 | "name": "laravel-server-monitor", 785 | "description": "

Monitor the health of your servers.<\/p>", 786 | "url": "https:\/\/github.com\/spatie\/laravel-server-monitor", 787 | "documentation_url": "https:\/\/github.com\/spatie\/laravel-server-monitor", 788 | "blogpost_url": "https:\/\/murze.be\/2017\/03\/monitoring-server-health-using-php\/", 789 | "download_count": 2563, 790 | "type": "laravel" 791 | }, 792 | { 793 | "id": 80, 794 | "name": "blink", 795 | "description": "

Cache that expires in the blink of an eye.<\/p>", 796 | "url": "https:\/\/github.com\/spatie\/blink", 797 | "documentation_url": null, 798 | "blogpost_url": null, 799 | "download_count": 8480, 800 | "type": "php" 801 | }, 802 | { 803 | "id": 81, 804 | "name": "laravel-blink", 805 | "description": "

Cache that expires in the blink of an eye.<\/p>", 806 | "url": "https:\/\/github.com\/spatie\/laravel-blink", 807 | "documentation_url": null, 808 | "blogpost_url": null, 809 | "download_count": 8481, 810 | "type": "laravel" 811 | }, 812 | { 813 | "id": 82, 814 | "name": "laravel-db-snapshots", 815 | "description": "

Quickly dump and load databases.<\/p>", 816 | "url": "https:\/\/github.com\/spatie\/laravel-db-snapshots", 817 | "documentation_url": null, 818 | "blogpost_url": "https:\/\/murze.be\/2017\/03\/laravel-package-quickly-dump-load-database\/", 819 | "download_count": 14390, 820 | "type": "laravel" 821 | }, 822 | { 823 | "id": 83, 824 | "name": "phpunit-snapshot-assertions", 825 | "description": "

A way to test without writing actual test\u00a0cases.<\/p>", 826 | "url": "https:\/\/github.com\/spatie\/phpunit-snapshot-assertions", 827 | "documentation_url": null, 828 | "blogpost_url": "https:\/\/medium.com\/@sebdedeyne\/a-package-for-snapshot-testing-in-phpunit-2e4558c07fe3", 829 | "download_count": 83582, 830 | "type": "php" 831 | }, 832 | { 833 | "id": 84, 834 | "name": "laravel-html", 835 | "description": "

Painless html generation.<\/p>", 836 | "url": "https:\/\/github.com\/spatie\/laravel-html", 837 | "documentation_url": "https:\/\/docs.spatie.be\/laravel-html\/v1\/introduction", 838 | "blogpost_url": "https:\/\/murze.be\/2017\/04\/conversation-laravel-html\/", 839 | "download_count": 15215, 840 | "type": "laravel" 841 | }, 842 | { 843 | "id": 85, 844 | "name": "dropbox-api", 845 | "description": "

A minimal implementation of Dropbox API v2.<\/p>", 846 | "url": "https:\/\/github.com\/spatie\/dropbox-api", 847 | "documentation_url": null, 848 | "blogpost_url": "https:\/\/murze.be\/2017\/04\/dropbox-will-turn-off-v1-of-their-api-soon-its-time-to-update-your-php-application\/", 849 | "download_count": 51228, 850 | "type": "php" 851 | }, 852 | { 853 | "id": 86, 854 | "name": "flysystem-dropbox", 855 | "description": "

A Flysystem adapter for Dropbox that uses v2 of the API.<\/p>", 856 | "url": "https:\/\/github.com\/spatie\/flysystem-dropbox", 857 | "documentation_url": null, 858 | "blogpost_url": "https:\/\/murze.be\/2017\/04\/dropbox-will-turn-off-v1-of-their-api-soon-its-time-to-update-your-php-application\/", 859 | "download_count": 49685, 860 | "type": "php" 861 | }, 862 | { 863 | "id": 87, 864 | "name": "email-concealer", 865 | "description": "

Conceal e-mail addresses in a string by replacing their domain.<\/p>", 866 | "url": "https:\/\/github.com\/spatie\/email-concealer", 867 | "documentation_url": null, 868 | "blogpost_url": null, 869 | "download_count": 23, 870 | "type": "php" 871 | }, 872 | { 873 | "id": 88, 874 | "name": "email-concealer-cli", 875 | "description": "

CLI tool for concealing e-mails in a file by replacing their domain.<\/p>", 876 | "url": "https:\/\/github.com\/spatie\/email-concealer-cli", 877 | "documentation_url": null, 878 | "blogpost_url": null, 879 | "download_count": 3, 880 | "type": "php" 881 | }, 882 | { 883 | "id": 89, 884 | "name": "vue-tabs-component", 885 | "description": "

An easy way to display tabs with Vue.<\/p>", 886 | "url": "https:\/\/github.com\/spatie\/vue-tabs-component", 887 | "documentation_url": null, 888 | "blogpost_url": "https:\/\/murze.be\/2017\/05\/vue-component-display-tabs\/", 889 | "download_count": null, 890 | "type": "javascript" 891 | }, 892 | { 893 | "id": 90, 894 | "name": "laravel-artisan-dd", 895 | "description": "

Quickly dd anything from the commandline.<\/p>", 896 | "url": "https:\/\/github.com\/spatie\/laravel-artisan-dd", 897 | "documentation_url": null, 898 | "blogpost_url": "https:\/\/murze.be\/2017\/05\/quickly-dd-anything-commandline\/", 899 | "download_count": 20861, 900 | "type": "laravel" 901 | }, 902 | { 903 | "id": 91, 904 | "name": "laravel-tinker-tools", 905 | "description": "

Use short class names in an Artisan tinker session.<\/p>", 906 | "url": "https:\/\/github.com\/spatie\/laravel-tinker-tools", 907 | "documentation_url": null, 908 | "blogpost_url": "https:\/\/murze.be\/2017\/05\/package-enable-short-class-names-artisan-tinker-session\/", 909 | "download_count": 43073, 910 | "type": "laravel" 911 | }, 912 | { 913 | "id": 92, 914 | "name": "laravel-json-api-paginate", 915 | "description": "

A paginator that plays nice with the JSON API spec.<\/p>", 916 | "url": "https:\/\/github.com\/spatie\/laravel-json-api-paginate", 917 | "documentation_url": null, 918 | "blogpost_url": null, 919 | "download_count": 4007, 920 | "type": "laravel" 921 | }, 922 | { 923 | "id": 93, 924 | "name": "image-optimizer", 925 | "description": "

Easily optimize all sorts of images using PHP.<\/p>", 926 | "url": "https:\/\/github.com\/spatie\/image-optimizer", 927 | "documentation_url": null, 928 | "blogpost_url": "https:\/\/murze.be\/2017\/07\/easily-optimize-images-using-php-binaries\/", 929 | "download_count": 139744, 930 | "type": "php" 931 | }, 932 | { 933 | "id": 94, 934 | "name": "laravel-image-optimizer", 935 | "description": "

Optimize image in your Laravel app.<\/p>", 936 | "url": "https:\/\/github.com\/spatie\/laravel-image-optimizer", 937 | "documentation_url": null, 938 | "blogpost_url": "https:\/\/murze.be\/2017\/07\/optimize-images-laravel-apps\/", 939 | "download_count": 13290, 940 | "type": "laravel" 941 | }, 942 | { 943 | "id": 95, 944 | "name": "phpunit-watcher", 945 | "description": "

Automatically rerun PHPUnit tests when source code changes.<\/p>", 946 | "url": "https:\/\/github.com\/spatie\/phpunit-watcher\/", 947 | "documentation_url": null, 948 | "blogpost_url": "https:\/\/murze.be\/2017\/08\/tool-automatically-rerun-phpunit-tests-source-code-changes\/", 949 | "download_count": 8758, 950 | "type": "php" 951 | }, 952 | { 953 | "id": 96, 954 | "name": "macroable", 955 | "description": "

A trait to dynamically add methods to a class<\/p>", 956 | "url": "https:\/\/github.com\/spatie\/macroable", 957 | "documentation_url": null, 958 | "blogpost_url": "https:\/\/murze.be\/2017\/09\/trait-dynamically-add-methods-class\/", 959 | "download_count": 34762, 960 | "type": "php" 961 | }, 962 | { 963 | "id": 97, 964 | "name": "calendar-links", 965 | "description": "

Generate add to calendar links for Google, iCal and other calendar systems<\/p>", 966 | "url": "https:\/\/github.com\/spatie\/calendar-links", 967 | "documentation_url": null, 968 | "blogpost_url": null, 969 | "download_count": 375, 970 | "type": "php" 971 | }, 972 | { 973 | "id": 98, 974 | "name": "laravel-stripe-webhooks", 975 | "description": "

Handle Stripe webhooks in a Laravel application.<\/p>", 976 | "url": "https:\/\/github.com\/spatie\/laravel-stripe-webhooks", 977 | "documentation_url": null, 978 | "blogpost_url": "https:\/\/murze.be\/2017\/10\/handling-stripe-webhooks-laravel-application\/", 979 | "download_count": 1744, 980 | "type": "laravel" 981 | }, 982 | { 983 | "id": 99, 984 | "name": "laravel-http-logger", 985 | "description": "

Log HTTP requests in Laravel applications.<\/p>", 986 | "url": "https:\/\/github.com\/spatie\/laravel-http-logger", 987 | "documentation_url": null, 988 | "blogpost_url": null, 989 | "download_count": 1376, 990 | "type": "laravel" 991 | }, 992 | { 993 | "id": 100, 994 | "name": "laravel-binary-uuid", 995 | "description": "

Use optimised binary UUIDs in Laravel<\/p>", 996 | "url": "https:\/\/github.com\/spatie\/laravel-binary-uuid", 997 | "documentation_url": null, 998 | "blogpost_url": null, 999 | "download_count": 426, 1000 | "type": "laravel" 1001 | }, 1002 | { 1003 | "id": 101, 1004 | "name": "laravel-cors", 1005 | "description": "

Set CORS headers in a Laravel application<\/p>", 1006 | "url": "https:\/\/github.com\/spatie\/laravel-cors", 1007 | "documentation_url": null, 1008 | "blogpost_url": null, 1009 | "download_count": 890, 1010 | "type": "laravel" 1011 | } 1012 | ] 1013 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/assets/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind preflight; 2 | 3 | a { 4 | color: inherit; 5 | } 6 | 7 | h1 { 8 | @apply .font-extrabold; 9 | @apply .leading-none; 10 | @apply .mb-8; 11 | @apply .text-lg; 12 | @apply .text-orange; 13 | @apply .tracking-wide; 14 | @apply .uppercase; 15 | } 16 | 17 | @tailwind utilities; 18 | -------------------------------------------------------------------------------- /resources/assets/js/react/app.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Home from './components/Home'; 3 | import Packages from './components/Packages'; 4 | import { withRouter, Route, Link } from 'react-router-dom'; 5 | 6 | const App = ({ packages, location }) => ( 7 |

8 | 14 | ← Back 15 | 16 | } /> 17 | } 20 | /> 21 |
22 | ); 23 | 24 | export default withRouter(App); 25 | -------------------------------------------------------------------------------- /resources/assets/js/react/components/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import uniq from 'lodash/uniq'; 3 | import { Link } from 'react-router-dom'; 4 | 5 | const Home = ({ packages }) => { 6 | const types = uniq(packages.map(p => p.type)).sort(); 7 | 8 | const listTypes = types.map((type, index) => ( 9 | 14 | {type} 15 | 16 | )); 17 | 18 | return ( 19 |
20 |

SSR with Laravel & React

21 |
22 |

23 | This is a quick demo app for server side rendering React with Laravel. Below is 24 | a list of our open source packages, which our client-side app has divided by 25 | type. 26 |

27 |

28 | We're using react-router for this page so each package type has its own 29 | permalink, and will be prerendered on the server if visited directly. 30 |

31 |
32 | 33 |
34 | ); 35 | }; 36 | 37 | export default Home; 38 | -------------------------------------------------------------------------------- /resources/assets/js/react/components/Packages.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { sortBy } from 'lodash'; 3 | 4 | function packageList(packages) { 5 | return sortBy(packages, 'name').map(p => ( 6 |
  • 7 | 12 |

    {p.name}

    13 |
    17 | 18 |
  • 19 | )); 20 | } 21 | 22 | const Packages = ({ match, packages }) => { 23 | const type = match.params.type; 24 | const listPackages = packages.filter(p => p.type === type); 25 | 26 | return ( 27 |
    28 |

    {type} packages by Spatie

    29 | 30 |
    31 | ); 32 | }; 33 | export default Packages; 34 | -------------------------------------------------------------------------------- /resources/assets/js/react/entry-client.js: -------------------------------------------------------------------------------- 1 | import App from './app'; 2 | import React from 'react'; 3 | import { render } from 'react-dom'; 4 | import { BrowserRouter } from 'react-router-dom'; 5 | 6 | // Grab the state from a global variable injected into the server-generated HTML 7 | const { packages } = window.__PRELOADED_STATE__; 8 | 9 | // Allow the passed state to be garbage-collected 10 | delete window.__PRELOADED_STATE__; 11 | 12 | render( 13 | 14 | 15 | , 16 | document.getElementById('app') 17 | ); 18 | -------------------------------------------------------------------------------- /resources/assets/js/react/entry-server.js: -------------------------------------------------------------------------------- 1 | /* global context, dispatch */ 2 | 3 | import App from './app'; 4 | import React from 'react'; 5 | import ReactDOMServer from 'react-dom/server'; 6 | import { StaticRouter } from 'react-router-dom'; 7 | 8 | // Compile an initial state 9 | const { packages } = context; 10 | 11 | const html = ReactDOMServer.renderToString( 12 |
    13 | 14 | 15 | 16 |
    17 | ); 18 | 19 | dispatch(html); 20 | -------------------------------------------------------------------------------- /resources/assets/js/vue/app.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import store from './store'; 3 | import router from './router'; 4 | import App from './components/App'; 5 | 6 | export default new Vue({ 7 | store, 8 | 9 | router, 10 | 11 | render: h => h(App), 12 | }); 13 | -------------------------------------------------------------------------------- /resources/assets/js/vue/components/App.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /resources/assets/js/vue/components/Home.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 36 | -------------------------------------------------------------------------------- /resources/assets/js/vue/components/Packages.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 43 | -------------------------------------------------------------------------------- /resources/assets/js/vue/entry-client.js: -------------------------------------------------------------------------------- 1 | import app from './app'; 2 | 3 | app.$store.commit('setPackages', { packages: window.packages }); 4 | 5 | app.$mount('#app'); 6 | -------------------------------------------------------------------------------- /resources/assets/js/vue/entry-server.js: -------------------------------------------------------------------------------- 1 | /* global context, dispatch */ 2 | 3 | import app from './app'; 4 | import renderVueComponentToString from 'vue-server-renderer/basic'; 5 | 6 | app.$router.push(context.url); 7 | 8 | app.$store.commit('setPackages', { packages: context.packages }); 9 | 10 | renderVueComponentToString(app, (err, html) => { 11 | if (err) { 12 | throw new Error(err); 13 | } 14 | dispatch(html); 15 | }); 16 | -------------------------------------------------------------------------------- /resources/assets/js/vue/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueRouter from 'vue-router'; 3 | import Home from './components/Home'; 4 | import Packages from './components/Packages'; 5 | 6 | Vue.use(VueRouter); 7 | 8 | const routes = [ 9 | { path: '/vue/', name: 'home', component: Home }, 10 | { path: '/vue/packages/:type', name: 'packages', component: Packages }, 11 | ]; 12 | 13 | export default new VueRouter({ 14 | mode: 'history', 15 | routes, 16 | }); 17 | -------------------------------------------------------------------------------- /resources/assets/js/vue/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import uniq from 'lodash/uniq'; 3 | import Vuex, { Store } from 'vuex'; 4 | 5 | Vue.use(Vuex); 6 | 7 | export default new Store({ 8 | state: { 9 | packages: [], 10 | }, 11 | 12 | getters: { 13 | types: state => uniq(state.packages.map(p => p.type)).sort(), 14 | 15 | packagesWithType: state => type => state.packages.filter(p => p.type === type), 16 | }, 17 | 18 | mutations: { 19 | setPackages(state, { packages }) { 20 | state.packages = packages; 21 | }, 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 20 | 'alpha' => 'The :attribute may only contain letters.', 21 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 22 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 23 | 'array' => 'The :attribute must be an array.', 24 | 'before' => 'The :attribute must be a date before :date.', 25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 26 | 'between' => [ 27 | 'numeric' => 'The :attribute must be between :min and :max.', 28 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 29 | 'string' => 'The :attribute must be between :min and :max characters.', 30 | 'array' => 'The :attribute must have between :min and :max items.', 31 | ], 32 | 'boolean' => 'The :attribute field must be true or false.', 33 | 'confirmed' => 'The :attribute confirmation does not match.', 34 | 'date' => 'The :attribute is not a valid date.', 35 | 'date_format' => 'The :attribute does not match the format :format.', 36 | 'different' => 'The :attribute and :other must be different.', 37 | 'digits' => 'The :attribute must be :digits digits.', 38 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 39 | 'dimensions' => 'The :attribute has invalid image dimensions.', 40 | 'distinct' => 'The :attribute field has a duplicate value.', 41 | 'email' => 'The :attribute must be a valid email address.', 42 | 'exists' => 'The selected :attribute is invalid.', 43 | 'file' => 'The :attribute must be a file.', 44 | 'filled' => 'The :attribute field must have a value.', 45 | 'image' => 'The :attribute must be an image.', 46 | 'in' => 'The selected :attribute is invalid.', 47 | 'in_array' => 'The :attribute field does not exist in :other.', 48 | 'integer' => 'The :attribute must be an integer.', 49 | 'ip' => 'The :attribute must be a valid IP address.', 50 | 'ipv4' => 'The :attribute must be a valid IPv4 address.', 51 | 'ipv6' => 'The :attribute must be a valid IPv6 address.', 52 | 'json' => 'The :attribute must be a valid JSON string.', 53 | 'max' => [ 54 | 'numeric' => 'The :attribute may not be greater than :max.', 55 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 56 | 'string' => 'The :attribute may not be greater than :max characters.', 57 | 'array' => 'The :attribute may not have more than :max items.', 58 | ], 59 | 'mimes' => 'The :attribute must be a file of type: :values.', 60 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 61 | 'min' => [ 62 | 'numeric' => 'The :attribute must be at least :min.', 63 | 'file' => 'The :attribute must be at least :min kilobytes.', 64 | 'string' => 'The :attribute must be at least :min characters.', 65 | 'array' => 'The :attribute must have at least :min items.', 66 | ], 67 | 'not_in' => 'The selected :attribute is invalid.', 68 | 'numeric' => 'The :attribute must be a number.', 69 | 'present' => 'The :attribute field must be present.', 70 | 'regex' => 'The :attribute format is invalid.', 71 | 'required' => 'The :attribute field is required.', 72 | 'required_if' => 'The :attribute field is required when :other is :value.', 73 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 74 | 'required_with' => 'The :attribute field is required when :values is present.', 75 | 'required_with_all' => 'The :attribute field is required when :values is present.', 76 | 'required_without' => 'The :attribute field is required when :values is not present.', 77 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 78 | 'same' => 'The :attribute and :other must match.', 79 | 'size' => [ 80 | 'numeric' => 'The :attribute must be :size.', 81 | 'file' => 'The :attribute must be :size kilobytes.', 82 | 'string' => 'The :attribute must be :size characters.', 83 | 'array' => 'The :attribute must contain :size items.', 84 | ], 85 | 'string' => 'The :attribute must be a string.', 86 | 'timezone' => 'The :attribute must be a valid zone.', 87 | 'unique' => 'The :attribute has already been taken.', 88 | 'uploaded' => 'The :attribute failed to upload.', 89 | 'url' => 'The :attribute format is invalid.', 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Custom Validation Language Lines 94 | |-------------------------------------------------------------------------- 95 | | 96 | | Here you may specify custom validation messages for attributes using the 97 | | convention "attribute.rule" to name the lines. This makes it quick to 98 | | specify a specific custom language line for a given attribute rule. 99 | | 100 | */ 101 | 102 | 'custom' => [ 103 | 'attribute-name' => [ 104 | 'rule-name' => 'custom-message', 105 | ], 106 | ], 107 | 108 | /* 109 | |-------------------------------------------------------------------------- 110 | | Custom Validation Attributes 111 | |-------------------------------------------------------------------------- 112 | | 113 | | The following language lines are used to swap attribute place-holders 114 | | with something more reader friendly such as E-Mail Address instead 115 | | of "email". This simply helps us make messages a little cleaner. 116 | | 117 | */ 118 | 119 | 'attributes' => [], 120 | 121 | ]; 122 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ $title }} 8 | 9 | 10 | {{ $slot }} 11 | 12 | 13 | -------------------------------------------------------------------------------- /resources/views/react.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Laravel + React server side rendering example 8 | 9 | 10 | 11 | 12 | {!! ssr('js/react/entry-server.js') 13 | // Share the packages with the server script through context 14 | ->context('packages', $packages) 15 | // If ssr fails, we need a container to render the app client-side 16 | ->fallback('
    ') 17 | ->render() !!} 18 | 19 | 23 | 24 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /resources/views/vue.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Laravel + Vue server side rendering example 8 | 9 | 10 | 11 | 12 | {!! ssr('js/vue/entry-server.js') 13 | // Share the packages with the server script through context 14 | ->context('packages', $packages) 15 | // If ssr fails, we need a container to render the app client-side 16 | ->fallback('
    ') 17 | ->render() !!} 18 | 19 | 23 | 24 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Laravel 9 | 10 | 11 | 12 | 13 | 14 | 66 | 67 | 68 |
    69 |
    70 |
    71 | Laravel Server Side
    Rendering Examples 72 |
    73 | 77 |
    78 |
    79 | 80 | 81 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /routes/web.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 | !ssr/ 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/ssr/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.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.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Tailwind - The Utility-First CSS Framework 4 | 5 | A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink), 6 | David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger). 7 | 8 | Welcome to the Tailwind config file. This is where you can customize 9 | Tailwind specifically for your project. Don't be intimidated by the 10 | length of this file. It's really just a big JavaScript object and 11 | we've done our very best to explain each section. 12 | 13 | View the full documentation at https://tailwindcss.com. 14 | 15 | 16 | |------------------------------------------------------------------------------- 17 | | The default config 18 | |------------------------------------------------------------------------------- 19 | | 20 | | This variable contains the default Tailwind config. You don't have 21 | | to use it, but it can sometimes be helpful to have available. For 22 | | example, you may choose to merge your custom configuration 23 | | values with some of the Tailwind defaults. 24 | | 25 | */ 26 | 27 | // let defaultConfig = require('tailwindcss/defaultConfig')() 28 | 29 | 30 | /* 31 | |------------------------------------------------------------------------------- 32 | | Colors https://tailwindcss.com/docs/colors 33 | |------------------------------------------------------------------------------- 34 | | 35 | | Here you can specify the colors used in your project. To get you started, 36 | | we've provided a generous palette of great looking colors that are perfect 37 | | for prototyping, but don't hesitate to change them for your project. You 38 | | own these colors, nothing will break if you change everything about them. 39 | | 40 | | We've used literal color names ("red", "blue", etc.) for the default 41 | | palette, but if you'd rather use functional names like "primary" and 42 | | "secondary", or even a numeric scale like "100" and "200", go for it. 43 | | 44 | */ 45 | 46 | let colors = { 47 | 'transparent': 'transparent', 48 | 49 | 'black': '#172a3d', 50 | 'grey-lightest': '#f3efea', 51 | 'grey-lighter': '#cbd2ce', 52 | 'grey-light': '#b8bfbb', 53 | 'grey': '#9b9591', 54 | 'grey-dark': '#767d79', 55 | 'grey-darker': '#4c534f', 56 | 'grey-darkest': '#171e1a', 57 | 'white': '#ffffff', 58 | 59 | 'paper': 'rgba(255, 249, 242, 0.5)', 60 | 'opaque': 'rgba(255, 255, 255, 0.5)', 61 | 'gold': '#a89f81', 62 | 63 | 'blue-lightest': '#cae1e8', 64 | 'blue-lighter': '#22a4c9', 65 | 'blue-light': '#22a4c9', 66 | 'blue': '#007593', 67 | 'blue-dark': '#004966', 68 | 'blue-darker': '#172a3d', 69 | 'blue-darkest': '#172a3d', 70 | 71 | 'orange-light': '#fbebcf', 72 | 'orange': '#ffa200', 73 | 'orange-dark': '#e89158', 74 | 'orange-darker': '#944600', 75 | } 76 | 77 | module.exports = { 78 | 79 | /* 80 | |----------------------------------------------------------------------------- 81 | | Colors https://tailwindcss.com/docs/colors 82 | |----------------------------------------------------------------------------- 83 | | 84 | | The color palette defined above is also assigned to the "colors" key of 85 | | your Tailwind config. This makes it easy to access them in your CSS 86 | | using Tailwind's config helper. For example: 87 | | 88 | | .error { color: config('colors.red') } 89 | | 90 | */ 91 | 92 | colors: colors, 93 | 94 | 95 | /* 96 | |----------------------------------------------------------------------------- 97 | | Screens https://tailwindcss.com/docs/responsive-design 98 | |----------------------------------------------------------------------------- 99 | | 100 | | Screens in Tailwind are translated to CSS media queries. They define the 101 | | responsive breakpoints for your project. By default Tailwind takes a 102 | | "mobile first" approach, where each screen size represents a minimum 103 | | viewport width. Feel free to have as few or as many screens as you 104 | | want, naming them in whatever way you'd prefer for your project. 105 | | 106 | | Tailwind also allows for more complex screen definitions, which can be 107 | | useful in certain situations. Be sure to see the full responsive 108 | | documentation for a complete list of options. 109 | | 110 | | Class name: .{screen}:{utility} 111 | | 112 | */ 113 | 114 | screens: { 115 | 'sm': '576px', 116 | 'md': '768px', 117 | 'lg': '992px', 118 | 'xl': '1200px', 119 | }, 120 | 121 | 122 | /* 123 | |----------------------------------------------------------------------------- 124 | | Fonts https://tailwindcss.com/docs/fonts 125 | |----------------------------------------------------------------------------- 126 | | 127 | | Here is where you define your project's font stack, or font families. 128 | | Keep in mind that Tailwind doesn't actually load any fonts for you. 129 | | If you're using custom fonts you'll need to import them prior to 130 | | defining them here. 131 | | 132 | | By default we provide a native font stack that works remarkably well on 133 | | any device or OS you're using, since it just uses the default fonts 134 | | provided by the platform. 135 | | 136 | | Class name: .font-{name} 137 | | 138 | */ 139 | 140 | fonts: { 141 | 'sans': [ 142 | 'system-ui', 143 | 'BlinkMacSystemFont', 144 | '-apple-system', 145 | 'Segoe UI', 146 | 'Roboto', 147 | 'Oxygen', 148 | 'Ubuntu', 149 | 'Cantarell', 150 | 'Fira Sans', 151 | 'Droid Sans', 152 | 'Helvetica Neue', 153 | 'sans-serif', 154 | ], 155 | 'serif': [ 156 | 'Constantia', 157 | 'Lucida Bright', 158 | 'Lucidabright', 159 | 'Lucida Serif', 160 | 'Lucida', 161 | 'DejaVu Serif', 162 | 'Bitstream Vera Serif', 163 | 'Liberation Serif', 164 | 'Georgia', 165 | 'serif', 166 | ], 167 | 'mono': [ 168 | 'Menlo', 169 | 'Monaco', 170 | 'Consolas', 171 | 'Liberation Mono', 172 | 'Courier New', 173 | 'monospace', 174 | ] 175 | }, 176 | 177 | 178 | /* 179 | |----------------------------------------------------------------------------- 180 | | Text sizes https://tailwindcss.com/docs/text-sizing 181 | |----------------------------------------------------------------------------- 182 | | 183 | | Here is where you define your text sizes. Name these in whatever way 184 | | makes the most sense to you. We use size names by default, but 185 | | you're welcome to use a numeric scale or even something else 186 | | entirely. 187 | | 188 | | By default Tailwind uses the "rem" unit type for most measurements. 189 | | This allows you to set a root font size which all other sizes are 190 | | then based on. That said, you are free to use whatever units you 191 | | prefer, be it rems, ems, pixels or other. 192 | | 193 | | Class name: .text-{size} 194 | | 195 | */ 196 | 197 | textSizes: { 198 | 'xs': '.75rem', // 12px 199 | 'sm': '.875rem', // 14px 200 | 'base': '1rem', // 16px 201 | 'lg': '1.125rem', // 18px 202 | 'xl': '1.25rem', // 20px 203 | '2xl': '1.5rem', // 24px 204 | '3xl': '1.875rem', // 30px 205 | '4xl': '2.25rem', // 36px 206 | '5xl': '3rem', // 48px 207 | }, 208 | 209 | 210 | /* 211 | |----------------------------------------------------------------------------- 212 | | Font weights https://tailwindcss.com/docs/font-weight 213 | |----------------------------------------------------------------------------- 214 | | 215 | | Here is where you define your font weights. We've provided a list of 216 | | common font weight names with their respective numeric scale values 217 | | to get you started. It's unlikely that your project will require 218 | | all of these, so we recommend removing those you don't need. 219 | | 220 | | Class name: .font-{weight} 221 | | 222 | */ 223 | 224 | fontWeights: { 225 | 'hairline': 100, 226 | 'thin': 200, 227 | 'light': 300, 228 | 'normal': 400, 229 | 'medium': 500, 230 | 'semibold': 600, 231 | 'bold': 700, 232 | 'extrabold': 800, 233 | 'black': 900, 234 | }, 235 | 236 | 237 | /* 238 | |----------------------------------------------------------------------------- 239 | | Leading (line height) https://tailwindcss.com/docs/line-height 240 | |----------------------------------------------------------------------------- 241 | | 242 | | Here is where you define your line height values, or as we call 243 | | them in Tailwind, leadings. 244 | | 245 | | Class name: .leading-{size} 246 | | 247 | */ 248 | 249 | leading: { 250 | 'none': 1, 251 | 'tight': 1.25, 252 | 'normal': 1.5, 253 | 'loose': 2, 254 | }, 255 | 256 | 257 | /* 258 | |----------------------------------------------------------------------------- 259 | | Tracking (letter spacing) https://tailwindcss.com/docs/letter-spacing 260 | |----------------------------------------------------------------------------- 261 | | 262 | | Here is where you define your letter spacing values, or as we call 263 | | them in Tailwind, tracking. 264 | | 265 | | Class name: .tracking-{size} 266 | | 267 | */ 268 | 269 | tracking: { 270 | 'tight': '-0.05em', 271 | 'normal': '0', 272 | 'wide': '0.05em', 273 | }, 274 | 275 | 276 | /* 277 | |----------------------------------------------------------------------------- 278 | | Text colors https://tailwindcss.com/docs/text-color 279 | |----------------------------------------------------------------------------- 280 | | 281 | | Here is where you define your text colors. By default these use the 282 | | color palette we defined above, however you're welcome to set these 283 | | independently if that makes sense for your project. 284 | | 285 | | Class name: .text-{color} 286 | | 287 | */ 288 | 289 | textColors: colors, 290 | 291 | 292 | /* 293 | |----------------------------------------------------------------------------- 294 | | Background colors https://tailwindcss.com/docs/background-color 295 | |----------------------------------------------------------------------------- 296 | | 297 | | Here is where you define your background colors. By default these use 298 | | the color palette we defined above, however you're welcome to set 299 | | these independently if that makes sense for your project. 300 | | 301 | | Class name: .bg-{color} 302 | | 303 | */ 304 | 305 | backgroundColors: colors, 306 | 307 | 308 | /* 309 | |----------------------------------------------------------------------------- 310 | | Background sizes https://tailwindcss.com/docs/background-size 311 | |----------------------------------------------------------------------------- 312 | | 313 | | Here is where you define your background sizes. We provide some common 314 | | values that are useful in most projects, but feel free to add other sizes 315 | | that are specific to your project here as well. 316 | | 317 | | Class name: .bg-{size} 318 | | 319 | */ 320 | 321 | backgroundSize: { 322 | 'auto': 'auto', 323 | 'cover': 'cover', 324 | 'contain': 'contain', 325 | }, 326 | 327 | 328 | /* 329 | |----------------------------------------------------------------------------- 330 | | Border widths https://tailwindcss.com/docs/border-width 331 | |----------------------------------------------------------------------------- 332 | | 333 | | Here is where you define your border widths. Take note that border 334 | | widths require a special "default" value set as well. This is the 335 | | width that will be used when you do not specify a border width. 336 | | 337 | | Class name: .border{-side?}{-width?} 338 | | 339 | */ 340 | 341 | borderWidths: { 342 | default: '1px', 343 | '0': '0', 344 | '2': '2px', 345 | '4': '4px', 346 | '8': '8px', 347 | }, 348 | 349 | 350 | /* 351 | |----------------------------------------------------------------------------- 352 | | Border colors https://tailwindcss.com/docs/border-color 353 | |----------------------------------------------------------------------------- 354 | | 355 | | Here is where you define your border colors. By default these use the 356 | | color palette we defined above, however you're welcome to set these 357 | | independently if that makes sense for your project. 358 | | 359 | | Take note that border colors require a special "default" value set 360 | | as well. This is the color that will be used when you do not 361 | | specify a border color. 362 | | 363 | | Class name: .border-{color} 364 | | 365 | */ 366 | 367 | borderColors: global.Object.assign({ default: colors['grey-light'] }, colors), 368 | 369 | 370 | /* 371 | |----------------------------------------------------------------------------- 372 | | Border radius https://tailwindcss.com/docs/border-radius 373 | |----------------------------------------------------------------------------- 374 | | 375 | | Here is where you define your border radius values. If a `default` radius 376 | | is provided, it will be made available as the non-suffixed `.rounded` 377 | | utility. 378 | | 379 | | If your scale includes a `0` value to reset already rounded corners, it's 380 | | a good idea to put it first so other values are able to override it. 381 | | 382 | | Class name: .rounded{-side?}{-size?} 383 | | 384 | */ 385 | 386 | borderRadius: { 387 | 'none': '0', 388 | 'sm': '.125rem', 389 | default: '.25rem', 390 | 'lg': '.5rem', 391 | 'full': '9999px', 392 | }, 393 | 394 | 395 | /* 396 | |----------------------------------------------------------------------------- 397 | | Width https://tailwindcss.com/docs/width 398 | |----------------------------------------------------------------------------- 399 | | 400 | | Here is where you define your width utility sizes. These can be 401 | | percentage based, pixels, rems, or any other units. By default 402 | | we provide a sensible rem based numeric scale, a percentage 403 | | based fraction scale, plus some other common use-cases. You 404 | | can, of course, modify these values as needed. 405 | | 406 | | 407 | | It's also worth mentioning that Tailwind automatically escapes 408 | | invalid CSS class name characters, which allows you to have 409 | | awesome classes like .w-2/3. 410 | | 411 | | Class name: .w-{size} 412 | | 413 | */ 414 | 415 | width: { 416 | 'auto': 'auto', 417 | 'px': '1px', 418 | '1': '0.25rem', 419 | '2': '0.5rem', 420 | '3': '0.75rem', 421 | '4': '1rem', 422 | '6': '1.5rem', 423 | '8': '2rem', 424 | '10': '2.5rem', 425 | '12': '3rem', 426 | '16': '4rem', 427 | '24': '6rem', 428 | '32': '8rem', 429 | '48': '12rem', 430 | '64': '16rem', 431 | '1/2': '50%', 432 | '1/3': '33.33333%', 433 | '2/3': '66.66667%', 434 | '1/4': '25%', 435 | '3/4': '75%', 436 | '1/5': '20%', 437 | '2/5': '40%', 438 | '3/5': '60%', 439 | '4/5': '80%', 440 | '1/6': '16.66667%', 441 | '5/6': '83.33333%', 442 | 'full': '100%', 443 | 'screen': '100vw' 444 | }, 445 | 446 | 447 | /* 448 | |----------------------------------------------------------------------------- 449 | | Height https://tailwindcss.com/docs/height 450 | |----------------------------------------------------------------------------- 451 | | 452 | | Here is where you define your height utility sizes. These can be 453 | | percentage based, pixels, rems, or any other units. By default 454 | | we provide a sensible rem based numeric scale plus some other 455 | | common use-cases. You can, of course, modify these values as 456 | | needed. 457 | | 458 | | Class name: .h-{size} 459 | | 460 | */ 461 | 462 | height: { 463 | 'auto': 'auto', 464 | 'px': '1px', 465 | '1': '0.25rem', 466 | '2': '0.5rem', 467 | '3': '0.75rem', 468 | '4': '1rem', 469 | '6': '1.5rem', 470 | '8': '2rem', 471 | '10': '2.5rem', 472 | '12': '3rem', 473 | '16': '4rem', 474 | '24': '6rem', 475 | '32': '8rem', 476 | '48': '12rem', 477 | '64': '16rem', 478 | 'full': '100%', 479 | 'screen': '100vh' 480 | }, 481 | 482 | 483 | /* 484 | |----------------------------------------------------------------------------- 485 | | Minimum width https://tailwindcss.com/docs/min-width 486 | |----------------------------------------------------------------------------- 487 | | 488 | | Here is where you define your minimum width utility sizes. These can 489 | | be percentage based, pixels, rems, or any other units. We provide a 490 | | couple common use-cases by default. You can, of course, modify 491 | | these values as needed. 492 | | 493 | | Class name: .min-w-{size} 494 | | 495 | */ 496 | 497 | minWidth: { 498 | '0': '0', 499 | 'full': '100%', 500 | }, 501 | 502 | 503 | /* 504 | |----------------------------------------------------------------------------- 505 | | Minimum height https://tailwindcss.com/docs/min-height 506 | |----------------------------------------------------------------------------- 507 | | 508 | | Here is where you define your minimum height utility sizes. These can 509 | | be percentage based, pixels, rems, or any other units. We provide a 510 | | few common use-cases by default. You can, of course, modify these 511 | | values as needed. 512 | | 513 | | Class name: .min-h-{size} 514 | | 515 | */ 516 | 517 | minHeight: { 518 | '0': '0', 519 | 'full': '100%', 520 | 'screen': '100vh' 521 | }, 522 | 523 | 524 | /* 525 | |----------------------------------------------------------------------------- 526 | | Maximum width https://tailwindcss.com/docs/max-width 527 | |----------------------------------------------------------------------------- 528 | | 529 | | Here is where you define your maximum width utility sizes. These can 530 | | be percentage based, pixels, rems, or any other units. By default 531 | | we provide a sensible rem based scale and a "full width" size, 532 | | which is basically a reset utility. You can, of course, 533 | | modify these values as needed. 534 | | 535 | | Class name: .max-w-{size} 536 | | 537 | */ 538 | 539 | maxWidth: { 540 | 'xs': '20rem', 541 | 'sm': '30rem', 542 | 'md': '40rem', 543 | 'lg': '50rem', 544 | 'xl': '60rem', 545 | '2xl': '70rem', 546 | '3xl': '80rem', 547 | '4xl': '90rem', 548 | '5xl': '100rem', 549 | 'full': '100%', 550 | }, 551 | 552 | 553 | /* 554 | |----------------------------------------------------------------------------- 555 | | Maximum height https://tailwindcss.com/docs/max-height 556 | |----------------------------------------------------------------------------- 557 | | 558 | | Here is where you define your maximum height utility sizes. These can 559 | | be percentage based, pixels, rems, or any other units. We provide a 560 | | couple common use-cases by default. You can, of course, modify 561 | | these values as needed. 562 | | 563 | | Class name: .max-h-{size} 564 | | 565 | */ 566 | 567 | maxHeight: { 568 | 'full': '100%', 569 | 'screen': '100vh', 570 | }, 571 | 572 | 573 | /* 574 | |----------------------------------------------------------------------------- 575 | | Padding https://tailwindcss.com/docs/padding 576 | |----------------------------------------------------------------------------- 577 | | 578 | | Here is where you define your padding utility sizes. These can be 579 | | percentage based, pixels, rems, or any other units. By default we 580 | | provide a sensible rem based numeric scale plus a couple other 581 | | common use-cases like "1px". You can, of course, modify these 582 | | values as needed. 583 | | 584 | | Class name: .p{side?}-{size} 585 | | 586 | */ 587 | 588 | padding: { 589 | 'px': '1px', 590 | '0': '0', 591 | '1': '0.25rem', 592 | '2': '0.5rem', 593 | '3': '0.75rem', 594 | '4': '1rem', 595 | '6': '1.5rem', 596 | '8': '2rem', 597 | '16': '4rem', 598 | '32': '8rem', 599 | }, 600 | 601 | 602 | /* 603 | |----------------------------------------------------------------------------- 604 | | Margin https://tailwindcss.com/docs/margin 605 | |----------------------------------------------------------------------------- 606 | | 607 | | Here is where you define your margin utility sizes. These can be 608 | | percentage based, pixels, rems, or any other units. By default we 609 | | provide a sensible rem based numeric scale plus a couple other 610 | | common use-cases like "1px". You can, of course, modify these 611 | | values as needed. 612 | | 613 | | Class name: .m{side?}-{size} 614 | | 615 | */ 616 | 617 | margin: { 618 | 'auto': 'auto', 619 | 'px': '1px', 620 | '0': '0', 621 | '1': '0.25rem', 622 | '2': '0.5rem', 623 | '3': '0.75rem', 624 | '4': '1rem', 625 | '6': '1.5rem', 626 | '8': '2rem', 627 | '12': '3rem', 628 | '16': '4rem', 629 | '32': '8rem', 630 | }, 631 | 632 | 633 | /* 634 | |----------------------------------------------------------------------------- 635 | | Negative margin https://tailwindcss.com/docs/negative-margin 636 | |----------------------------------------------------------------------------- 637 | | 638 | | Here is where you define your negative margin utility sizes. These can 639 | | be percentage based, pixels, rems, or any other units. By default we 640 | | provide matching values to the padding scale since these utilities 641 | | generally get used together. You can, of course, modify these 642 | | values as needed. 643 | | 644 | | Class name: .-m{side?}-{size} 645 | | 646 | */ 647 | 648 | negativeMargin: { 649 | 'px': '1px', 650 | '0': '0', 651 | '1': '0.25rem', 652 | '2': '0.5rem', 653 | '3': '0.75rem', 654 | '4': '1rem', 655 | '6': '1.5rem', 656 | '8': '2rem', 657 | }, 658 | 659 | 660 | /* 661 | |----------------------------------------------------------------------------- 662 | | Shadows https://tailwindcss.com/docs/shadows 663 | |----------------------------------------------------------------------------- 664 | | 665 | | Here is where you define your shadow utilities. As you can see from 666 | | the defaults we provide, it's possible to apply multiple shadows 667 | | per utility using comma separation. 668 | | 669 | | If a `default` shadow is provided, it will be made available as the non- 670 | | suffixed `.shadow` utility. 671 | | 672 | | Class name: .shadow-{size?} 673 | | 674 | */ 675 | 676 | shadows: { 677 | default: '0 2px 4px 0 rgba(0,0,0,0.025)', 678 | 'md': '0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08)', 679 | 'lg': '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)', 680 | 'inner': 'inset 0 2px 4px 0 rgba(0,0,0,0.06)', 681 | 'none': 'none', 682 | }, 683 | 684 | 685 | /* 686 | |----------------------------------------------------------------------------- 687 | | Z-index https://tailwindcss.com/docs/z-index 688 | |----------------------------------------------------------------------------- 689 | | 690 | | Here is where you define your z-index utility values. By default we 691 | | provide a sensible numeric scale. You can, of course, modify these 692 | | values as needed. 693 | | 694 | | Class name: .z-{index} 695 | | 696 | */ 697 | 698 | zIndex: { 699 | 'auto': 'auto', 700 | '0': 0, 701 | '10': 10, 702 | '20': 20, 703 | '30': 30, 704 | '40': 40, 705 | '50': 50, 706 | }, 707 | 708 | 709 | /* 710 | |----------------------------------------------------------------------------- 711 | | Opacity https://tailwindcss.com/docs/opacity 712 | |----------------------------------------------------------------------------- 713 | | 714 | | Here is where you define your opacity utility values. By default we 715 | | provide a sensible numeric scale. You can, of course, modify these 716 | | values as needed. 717 | | 718 | | Class name: .opacity-{name} 719 | | 720 | */ 721 | 722 | opacity: { 723 | '0': '0', 724 | '25': '.25', 725 | '50': '.5', 726 | '75': '.75', 727 | '100': '1', 728 | }, 729 | 730 | 731 | /* 732 | |----------------------------------------------------------------------------- 733 | | SVG fill https://tailwindcss.com/docs/svg 734 | |----------------------------------------------------------------------------- 735 | | 736 | | Here is where you define your SVG fill colors. By default we just provide 737 | | `fill-current` which sets the fill to the current text color. This lets you 738 | | specify a fill color using existing text color utilities and helps keep the 739 | | generated CSS file size down. 740 | | 741 | | Class name: .fill-{name} 742 | | 743 | */ 744 | 745 | svgFill: { 746 | 'current': 'currentColor', 747 | }, 748 | 749 | 750 | /* 751 | |----------------------------------------------------------------------------- 752 | | SVG stroke https://tailwindcss.com/docs/svg 753 | |----------------------------------------------------------------------------- 754 | | 755 | | Here is where you define your SVG stroke colors. By default we just provide 756 | | `stroke-current` which sets the stroke to the current text color. This lets 757 | | you specify a stroke color using existing text color utilities and helps 758 | | keep the generated CSS file size down. 759 | | 760 | | Class name: .stroke-{name} 761 | | 762 | */ 763 | 764 | svgStroke: { 765 | 'current': 'currentColor', 766 | }, 767 | 768 | 769 | /* 770 | |----------------------------------------------------------------------------- 771 | | Modules https://tailwindcss.com/docs/configuration#modules 772 | |----------------------------------------------------------------------------- 773 | | 774 | | Here is where you control which modules are generated and what variants are 775 | | generated for each of those modules. 776 | | 777 | | Currently supported variants: 778 | | - responsive 779 | | - hover 780 | | - focus 781 | | - active 782 | | - group-hover 783 | | 784 | | To disable a module completely, use `false` instead of an array. 785 | | 786 | */ 787 | 788 | modules: { 789 | appearance: ['responsive'], 790 | backgroundAttachment: ['responsive'], 791 | backgroundColors: ['responsive', 'hover'], 792 | backgroundPosition: ['responsive'], 793 | backgroundRepeat: ['responsive'], 794 | backgroundSize: ['responsive'], 795 | borderColors: ['responsive', 'hover'], 796 | borderRadius: ['responsive'], 797 | borderStyle: ['responsive'], 798 | borderWidths: ['responsive'], 799 | cursor: ['responsive'], 800 | display: ['responsive'], 801 | flexbox: ['responsive'], 802 | float: ['responsive'], 803 | fonts: ['responsive'], 804 | fontWeights: ['responsive', 'hover'], 805 | height: ['responsive'], 806 | leading: ['responsive'], 807 | lists: ['responsive'], 808 | margin: ['responsive'], 809 | maxHeight: ['responsive'], 810 | maxWidth: ['responsive'], 811 | minHeight: ['responsive'], 812 | minWidth: ['responsive'], 813 | negativeMargin: ['responsive'], 814 | opacity: ['responsive'], 815 | overflow: ['responsive'], 816 | padding: ['responsive'], 817 | pointerEvents: ['responsive'], 818 | position: ['responsive'], 819 | resize: ['responsive'], 820 | shadows: ['responsive'], 821 | svgFill: [], 822 | svgStroke: [], 823 | textAlign: ['responsive'], 824 | textColors: ['responsive', 'hover'], 825 | textSizes: ['responsive'], 826 | textStyle: ['responsive', 'hover'], 827 | tracking: ['responsive'], 828 | userSelect: ['responsive'], 829 | verticalAlign: ['responsive'], 830 | visibility: ['responsive'], 831 | whitespace: ['responsive'], 832 | width: ['responsive'], 833 | zIndex: ['responsive'], 834 | }, 835 | 836 | 837 | /* 838 | |----------------------------------------------------------------------------- 839 | | Plugins https://tailwindcss.com/docs/plugins 840 | |----------------------------------------------------------------------------- 841 | | 842 | | Here is where you can register any plugins you'd like to use in your 843 | | project. Tailwind's built-in `container` plugin is enabled by default to 844 | | give you a Bootstrap-style responsive container component out of the box. 845 | | 846 | | Be sure to view the complete plugin documentation to learn more about how 847 | | the plugin system works. 848 | | 849 | */ 850 | 851 | plugins: [ 852 | require('tailwindcss/plugins/container')({ 853 | // center: true, 854 | // padding: '1rem', 855 | }), 856 | ], 857 | 858 | 859 | /* 860 | |----------------------------------------------------------------------------- 861 | | Advanced Options https://tailwindcss.com/docs/configuration#options 862 | |----------------------------------------------------------------------------- 863 | | 864 | | Here is where you can tweak advanced configuration options. We recommend 865 | | leaving these options alone unless you absolutely need to change them. 866 | | 867 | */ 868 | 869 | options: { 870 | prefix: '', 871 | important: false, 872 | separator: ':', 873 | }, 874 | 875 | } 876 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 20 | 21 | Hash::setRounds(4); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const glob = require('glob-all'); 3 | const mix = require('laravel-mix'); 4 | const PurgecssPlugin = require('purgecss-webpack-plugin'); 5 | 6 | /* 7 | |-------------------------------------------------------------------------- 8 | | Mix Asset Management 9 | |-------------------------------------------------------------------------- 10 | | 11 | | Mix provides a clean, fluent API for defining some Webpack build steps 12 | | for your Laravel application. By default, we are compiling the Sass 13 | | file for the application as well as bundling up all the JS files. 14 | | 15 | */ 16 | 17 | mix 18 | .js('resources/assets/js/vue/entry-client.js', 'public/js/vue') 19 | .js('resources/assets/js/vue/entry-server.js', 'public/js/vue') 20 | 21 | .react('resources/assets/js/react/entry-client.js', 'public/js/react') 22 | .react('resources/assets/js/react/entry-server.js', 'public/js/react') 23 | 24 | .postCss('resources/assets/css/app.css', 'public/css/app.css', [ 25 | require('tailwindcss')('./tailwind.js'), 26 | ]) 27 | 28 | .webpackConfig(() => { 29 | const config = {}; 30 | 31 | config.resolve = { 32 | alias: { 33 | vue$: 'vue/dist/vue.runtime.common.js', 34 | }, 35 | }; 36 | 37 | if (mix.inProduction()) { 38 | config.plugins = [ 39 | new PurgecssPlugin({ 40 | paths: glob.sync([ 41 | path.join(__dirname, 'app/**/*.php'), 42 | path.join(__dirname, 'resources/views/**/*.blade.php'), 43 | path.join(__dirname, 'resources/assets/js/**/*.vue'), 44 | path.join(__dirname, 'resources/assets/js/**/*.js'), 45 | ]), 46 | extractors: [ 47 | { 48 | extractor: class { 49 | static extract(content) { 50 | return content.match(/[A-z0-9-:\/]+/g) || []; 51 | } 52 | }, 53 | extensions: ['html', 'js', 'php', 'vue'], 54 | }, 55 | ], 56 | }), 57 | ]; 58 | } 59 | 60 | return config; 61 | }); 62 | --------------------------------------------------------------------------------