michielkempen / smoothy-package
A Laravel 5 package to kickstart your Smoothy application
Requires
- php: ^7.0
- cocur/slugify: 2.*
- devitek/yaml-translation: 3.*
- guzzlehttp/guzzle: ^6.2
- illuminate/http: 5.4.*
- illuminate/support: 5.4.*
- jakeasmith/http_build_url: ^1.0
- laravelcollective/html: ^5.2
- league/glide-laravel: ^1.0
- predis/predis: ^1.1
- spatie/laravel-collection-macros: ^2.1
- spatie/laravel-cookie-consent: ^1.8
This package is auto-updated.
Last update: 2023-11-25 05:33:10 UTC
README
A Laravel 5 package to kickstart your Smoothy application.
Installation
You can install this package via composer using:
composer require michielkempen/smoothy-package
Service providers
Remove the code below from config/app.php
'providers' => [ App\Providers\RouteServiceProvider::class, ]
Add the code below to config/app.php
'providers' => [ \Smoothy\Providers\SmoothyServiceProvider::class, ]
Middleware
Add the code below to app/Http/Kernel.php
protected $middlewareGroups = [ 'web' => [ \Smoothy\Api\Setup\Middleware\SetupSmoothyApi::class, \Smoothy\Middleware\CheckSmoothyStatus::class, \Smoothy\Middleware\CheckWebsiteStatus::class, ], ];
API configuration
Add the following variables to .env
CACHE_DRIVER = redis
SMOOTHY_API_ENABLED = true
SMOOTHY_API_CLIENT_ID = ...
SMOOTHY_API_CLIENT_SECRET = ...
SMOOTHY_IMAGE_MANIPULATION_SECRET = ...
SMOOTHY_LICENSE_ID = ...
SMOOTHY_CACHE_HOST = ...
SMOOTHY_CACHE_PASSWORD = ...
Add the code below to app/config/cache.php
'stores' => [ 'smoothy_cdn' => [ 'driver' => 'redis', 'connection' => 'smoothy_cdn', ], 'smoothy_access_tokens' => [ 'driver' => 'redis', 'connection' => 'smoothy_access_tokens', ], ],
Add the code below to app/config/database.php
'redis' => [ 'smoothy_cdn' => [ 'host' => env('SMOOTHY_CACHE_HOST'), 'password' => env('SMOOTHY_CACHE_PASSWORD'), 'port' => env('SMOOTHY_CACHE_PORT', 6379), 'database' => env('SMOOTHY_CACHE_STORE', 0), ], 'smoothy_access_tokens' => [ 'host' => env('SMOOTHY_CACHE_HOST'), 'password' => env('SMOOTHY_CACHE_PASSWORD'), 'port' => env('SMOOTHY_CACHE_PORT', 6379), 'database' => 2, ], ],
Assets
Run php artisan vendor:publish --provider="Smoothy\Providers\SmoothyServiceProvider" --force
.
Install the dependencies npm install
.
Set browserSync proxy in gulpfile.js
.
Execute gulp
.
Usage
Update assets
Run php artisan vendor:publish --provider="Smoothy\Providers\SmoothyServiceProvider" --tag=update --force
Views
@extends("smoothy::master")
@section("app_meta")
<!-- meta data -->
@stop
@section("styles")
<!-- additional styles -->
@stop
@section("page")
<!-- content -->
@stop
@section("scripts")
<!-- additional scripts -->
@stop
Routes
registerGet(
trans('routes.news').'/{article}',
'news.show',
\App\Http\Controllers\NewsController::class.'@show'
);