From 46b1e6a426dc403956ce653ed3d660f54367f346 Mon Sep 17 00:00:00 2001 From: Xety Date: Sun, 27 Oct 2019 00:43:50 +0200 Subject: [PATCH] Updated to Laravel 5.8 --- app/Http/Components/AnalyticsComponent.php | 1 - app/Http/Controllers/Admin/PageController.php | 20 +++--- app/Http/Kernel.php | 16 +++++ app/Markdown/Emoji/EmojiExtension.php | 16 +++-- app/Markdown/Emoji/EmojiParser.php | 8 +-- app/Markdown/Reply/ReplyExtension.php | 16 +++-- app/Markdown/Reply/ReplyParser.php | 10 +-- app/Markdown/Table/TableExtension.php | 54 +++++++--------- app/Markdown/Table/TableRenderer.php | 9 ++- app/Markdown/TaskLists/TaskListsCheckbox.php | 44 ------------- .../TaskLists/TaskListsCheckboxRenderer.php | 57 ----------------- app/Markdown/TaskLists/TaskListsExtension.php | 58 ------------------ app/Markdown/TaskLists/TaskListsParser.php | 61 ------------------- .../PathGenerator/XetaravelPathGenerator.php | 14 ++++- app/Models/User.php | 6 +- bootstrap/app.php | 2 +- composer.json | 35 +++++------ config/analytics.php | 4 +- config/app.php | 14 +++++ config/cache.php | 5 +- config/markdown.php | 15 ++++- config/medialibrary.php | 15 ++--- config/queue.php | 2 +- config/session.php | 4 +- .../2017_05_02_133801_create_media_table.php | 9 +-- vagrant-ssh.bat | 1 + 26 files changed, 168 insertions(+), 328 deletions(-) delete mode 100644 app/Markdown/TaskLists/TaskListsCheckbox.php delete mode 100644 app/Markdown/TaskLists/TaskListsCheckboxRenderer.php delete mode 100644 app/Markdown/TaskLists/TaskListsExtension.php delete mode 100644 app/Markdown/TaskLists/TaskListsParser.php create mode 100644 vagrant-ssh.bat diff --git a/app/Http/Components/AnalyticsComponent.php b/app/Http/Components/AnalyticsComponent.php index 3aa6084f..d159ea70 100644 --- a/app/Http/Components/AnalyticsComponent.php +++ b/app/Http/Components/AnalyticsComponent.php @@ -2,7 +2,6 @@ namespace Xetaravel\Http\Components; use Carbon\Carbon; -use Rinvex\Country\CountryLoader; use Spatie\Analytics\AnalyticsFacade; use Spatie\Analytics\Period; diff --git a/app/Http/Controllers/Admin/PageController.php b/app/Http/Controllers/Admin/PageController.php index adf0c42c..27fdef6a 100644 --- a/app/Http/Controllers/Admin/PageController.php +++ b/app/Http/Controllers/Admin/PageController.php @@ -30,28 +30,28 @@ public function __construct() */ public function index() { - $minutes = config('analytics.cache_lifetime_in_minutes'); + $secondes = config('analytics.cache_lifetime_in_secondes'); $viewDatas = []; if (config('analytics.enabled')) { // @codeCoverageIgnoreStart - $visitorsData = Cache::remember('Analytics.visitors', $minutes, function () { + $visitorsData = Cache::remember('Analytics.visitors', $secondes, function () { return $this->buildVisitorsGraph(); }); array_push($viewDatas, 'visitorsData'); - $browsersData = Cache::remember('Analytics.browsers', $minutes, function () { + $browsersData = Cache::remember('Analytics.browsers', $secondes, function () { return $this->buildBrowsersGraph(); }); array_push($viewDatas, 'browsersData'); - $countriesData = Cache::remember('Analytics.countries', $minutes, function () { + $countriesData = Cache::remember('Analytics.countries', $secondes, function () { return $this->buildCountriesGraph(); }); array_push($viewDatas, 'countriesData'); - $devicesGraph = Cache::remember('Analytics.devices', $minutes, function () { + $devicesGraph = Cache::remember('Analytics.devices', $secondes, function () { return $this->buildDevicesGraph(); }); array_push($viewDatas, 'devicesGraph'); @@ -59,29 +59,29 @@ public function index() $topCountries = array_slice($countriesData->rows, 0, 3); array_push($viewDatas, 'topCountries'); - $operatingSystemGraph = Cache::remember('Analytics.operatingsystem', $minutes, function () { + $operatingSystemGraph = Cache::remember('Analytics.operatingsystem', $secondes, function () { return $this->buildOperatingSytemGraph(); }); array_push($viewDatas, 'operatingSystemGraph'); - $todayVisitors = Cache::remember('Analytics.todayvisitors', $minutes, function () { + $todayVisitors = Cache::remember('Analytics.todayvisitors', $secondes, function () { return $this->buildTodayVisitors(); }); array_push($viewDatas, 'todayVisitors'); // @codeCoverageIgnoreEnd } - $usersCount = Cache::remember('Analytics.users.count', $minutes, function () { + $usersCount = Cache::remember('Analytics.users.count', $secondes, function () { return User::count(); }); array_push($viewDatas, 'usersCount'); - $articlesCount = Cache::remember('Analytics.articles.count', $minutes, function () { + $articlesCount = Cache::remember('Analytics.articles.count', $secondes, function () { return Article::count(); }); array_push($viewDatas, 'articlesCount'); - $commentsCount = Cache::remember('Analytics.comments.count', $minutes, function () { + $commentsCount = Cache::remember('Analytics.comments.count', $secondes, function () { return Comment::count(); }); array_push($viewDatas, 'commentsCount'); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index f77e6940..a6284d57 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -65,4 +65,20 @@ class Kernel extends HttpKernel 'role' => \Ultraware\Roles\Middleware\VerifyRole::class, 'level' => \Ultraware\Roles\Middleware\VerifyLevel::class, ]; + + /** + * The priority-sorted list of middleware. + * + * This forces non-global middleware to always be in the given order. + * + * @var array + */ + protected $middlewarePriority = [ + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\Authenticate::class, + \Illuminate\Session\Middleware\AuthenticateSession::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + \Illuminate\Auth\Middleware\Authorize::class, + ]; } diff --git a/app/Markdown/Emoji/EmojiExtension.php b/app/Markdown/Emoji/EmojiExtension.php index e04c4588..c0767a84 100644 --- a/app/Markdown/Emoji/EmojiExtension.php +++ b/app/Markdown/Emoji/EmojiExtension.php @@ -1,23 +1,24 @@ parser = $parser; } @@ -27,8 +28,13 @@ public function __construct(EmojiParser $parser) * * @return array */ - public function getInlineParsers() + /*public function getInlineParsers() { return [$this->parser]; + }*/ + + public function register(ConfigurableEnvironmentInterface $environment) + { + $environment->addInlineParser(new EmojiParser); } } diff --git a/app/Markdown/Emoji/EmojiParser.php b/app/Markdown/Emoji/EmojiParser.php index 7217089c..918b2292 100644 --- a/app/Markdown/Emoji/EmojiParser.php +++ b/app/Markdown/Emoji/EmojiParser.php @@ -2,10 +2,10 @@ namespace Xetaravel\Markdown\Emoji; use League\CommonMark\Inline\Element\Image; -use League\CommonMark\Inline\Parser\AbstractInlineParser; +use League\CommonMark\Inline\Parser\InlineParserInterface; use League\CommonMark\InlineParserContext; -class EmojiParser extends AbstractInlineParser +class EmojiParser implements InlineParserInterface { /** * The emoji mappings. @@ -44,7 +44,7 @@ public function __construct() * * @return array */ - public function getCharacters() + public function getCharacters(): array { return [':']; } @@ -57,7 +57,7 @@ public function getCharacters() * * @return bool */ - public function parse(InlineParserContext $inlineContext) + public function parse(InlineParserContext $inlineContext): bool { $cursor = $inlineContext->getCursor(); diff --git a/app/Markdown/Reply/ReplyExtension.php b/app/Markdown/Reply/ReplyExtension.php index 381d9690..206653bf 100644 --- a/app/Markdown/Reply/ReplyExtension.php +++ b/app/Markdown/Reply/ReplyExtension.php @@ -1,16 +1,17 @@ new ReplyRenderer(), ]; + }*/ + + public function register(ConfigurableEnvironmentInterface $environment) + { + $environment + ->addBlockParser(new ReplyParser) + ->addBlockRenderer(Reply::class, new ReplyRenderer); } } diff --git a/app/Markdown/Reply/ReplyParser.php b/app/Markdown/Reply/ReplyParser.php index 54281669..e2104235 100644 --- a/app/Markdown/Reply/ReplyParser.php +++ b/app/Markdown/Reply/ReplyParser.php @@ -1,13 +1,12 @@ [\w]{4,20})\#(?[0-9]{1,16})/'; @@ -16,11 +15,12 @@ class ReplyParser extends AbstractBlockParser * Parse a line and determine if it contains an emoji. If it does, * then we do the necessary. * - * @param \League\CommonMark\InlineParserContext $inlineContext + * @param \League\CommonMark\ContextInterface $context + * @param \League\CommonMark\Cursor $cursor * * @return bool */ - public function parse(ContextInterface $context, Cursor $cursor) + public function parse(ContextInterface $context, Cursor $cursor): bool { $matches = RegexHelper::matchAll(self::REGEXP_REPLY, $cursor->getLine()); diff --git a/app/Markdown/Table/TableExtension.php b/app/Markdown/Table/TableExtension.php index 81ef0fad..5ee535c5 100644 --- a/app/Markdown/Table/TableExtension.php +++ b/app/Markdown/Table/TableExtension.php @@ -1,40 +1,30 @@ new TableRenderer(), - \Webuni\CommonMark\TableExtension\TableCaption::class => new TableCaptionRenderer(), - \Webuni\CommonMark\TableExtension\TableRows::class => new TableRowsRenderer(), - \Webuni\CommonMark\TableExtension\TableRow::class => new TableRowRenderer(), - \Webuni\CommonMark\TableExtension\TableCell::class => new TableCellRenderer(), - ]; + $environment + ->addBlockParser(new TableParser()) + ->addBlockRenderer(Table::class, new TableRenderer()) + ->addBlockRenderer(TableCaption::class, new TableCaptionRenderer()) + ->addBlockRenderer(TableSection::class, new TableSectionRenderer()) + ->addBlockRenderer(TableRow::class, new TableRowRenderer()) + ->addBlockRenderer(TableCell::class, new TableCellRenderer()) + ; } } diff --git a/app/Markdown/Table/TableRenderer.php b/app/Markdown/Table/TableRenderer.php index d52a09b7..1794f019 100644 --- a/app/Markdown/Table/TableRenderer.php +++ b/app/Markdown/Table/TableRenderer.php @@ -5,9 +5,9 @@ use League\CommonMark\Block\Renderer\BlockRendererInterface; use League\CommonMark\ElementRendererInterface; use League\CommonMark\HtmlElement; -use Webuni\CommonMark\TableExtension\Table; +use League\CommonMark\Ext\Table\Table; -class TableRenderer implements BlockRendererInterface +final class TableRenderer implements BlockRendererInterface { /** * Render the table element. @@ -20,19 +20,18 @@ class TableRenderer implements BlockRendererInterface * * @return \League\CommonMark\HtmlElement */ - public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, $inTightList = false) + public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, bool $inTightList = false) { if (!($block instanceof Table)) { throw new \InvalidArgumentException('Incompatible block type: ' . get_class($block)); } - $attrs = []; + foreach ($block->getData('attributes', []) as $key => $value) { $attrs[$key] = $htmlRenderer->escape($value, true); } $attrs['class'] = 'table'; - $separator = $htmlRenderer->getOption('inner_separator', "\n"); return new HtmlElement( diff --git a/app/Markdown/TaskLists/TaskListsCheckbox.php b/app/Markdown/TaskLists/TaskListsCheckbox.php deleted file mode 100644 index 7f22547c..00000000 --- a/app/Markdown/TaskLists/TaskListsCheckbox.php +++ /dev/null @@ -1,44 +0,0 @@ -checked = $checked; - $this->data = $attributes; - } - - /** - * Check if the checkbox is checked. - * - * @return bool - */ - public function isChecked() - { - return $this->checked; - } -} diff --git a/app/Markdown/TaskLists/TaskListsCheckboxRenderer.php b/app/Markdown/TaskLists/TaskListsCheckboxRenderer.php deleted file mode 100644 index fa666e15..00000000 --- a/app/Markdown/TaskLists/TaskListsCheckboxRenderer.php +++ /dev/null @@ -1,57 +0,0 @@ -getData('attributes', []) as $key => $value) { - $attrs[$key] = Xml::escape($value, true); - } - - $attrs['type'] = 'checkbox'; - $attrs['disabled'] = ''; - $attrs['class'] = 'custom-control-input'; - - if ($inline->isChecked()) { - $attrs['checked'] = 'checked'; - } - $text = $inline->getData('text', ''); - - if (!empty($text)) { - $text = Xml::escape($text, true); - } - - return new HtmlElement( - 'label', - ['class' => 'custom-control custom-checkbox custom-checkbox-disabled'], - [ - new HtmlElement('input', $attrs), - new HtmlElement('span', ['class' => 'custom-control-indicator']), - new HtmlElement('span', ['class' => 'custom-control-description'], $text) - ] - ); - } -} diff --git a/app/Markdown/TaskLists/TaskListsExtension.php b/app/Markdown/TaskLists/TaskListsExtension.php deleted file mode 100644 index 728e65d6..00000000 --- a/app/Markdown/TaskLists/TaskListsExtension.php +++ /dev/null @@ -1,58 +0,0 @@ -parser = $parser; - $this->renderer = $renderer; - } - - /** - * Returns a list of inline parsers to add to the existing list. - * - * @return array - */ - public function getInlineParsers() - { - return [$this->parser]; - } - - /** - * Returns a list of inline renderers to add to the existing list. - * - * @return array - */ - public function getInlineRenderers() - { - return [ - TaskListsCheckbox::class => $this->renderer - ]; - } -} diff --git a/app/Markdown/TaskLists/TaskListsParser.php b/app/Markdown/TaskLists/TaskListsParser.php deleted file mode 100644 index ff0e7244..00000000 --- a/app/Markdown/TaskLists/TaskListsParser.php +++ /dev/null @@ -1,61 +0,0 @@ -getCursor(); - $delimiterStack = $inlineContext->getDelimiterStack(); - - if ($cursor->peek(-1) !== '[') { - return false; - } - - if ($cursor->peek(-2) == '!' || - $cursor->peek(-1) !== '[' || - $cursor->peek(1) !== ']' || - $cursor->peek(2) !== ' ' - ) { - return false; - } - - $status = $cursor->peek(0) == 'x'; - - $cursor->advanceBy(2); - - // Add entry to stack for this opener - $delimiter = new Delimiter('[', 1, $inlineContext->getContainer()->firstChild(), true, false, 0); - $delimiterStack->push($delimiter); - - $opener = $delimiterStack->searchByCharacter(['[']); - $text = $cursor->match('/\S(.*)/'); - $opener->getInlineNode()->replaceWith(new TaskListsCheckbox($status, ['text' => $text])); - - $delimiterStack->removeDelimiter($opener); - - return true; - } -} diff --git a/app/MediaLibrary/PathGenerator/XetaravelPathGenerator.php b/app/MediaLibrary/PathGenerator/XetaravelPathGenerator.php index 7895e070..bda0c850 100644 --- a/app/MediaLibrary/PathGenerator/XetaravelPathGenerator.php +++ b/app/MediaLibrary/PathGenerator/XetaravelPathGenerator.php @@ -1,7 +1,7 @@ getPath($media) . 'conversions/'; } + + /* + * Get the path for responsive images of the given media, relative to the root storage path. + * + * @param \Spatie\MediaLibrary\Models\Media $media + * + * @return string + */ + public function getPathForResponsiveImages(Media $media): string + { + return $this->getPath($media) . 'conversions/'; + } } diff --git a/app/Models/User.php b/app/Models/User.php index 567b603a..e2b7181b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -11,9 +11,9 @@ use Illuminate\Foundation\Auth\Access\Authorizable; use Illuminate\Notifications\DatabaseNotification; use Illuminate\Notifications\Notifiable; +use Spatie\MediaLibrary\HasMedia\HasMedia; use Spatie\MediaLibrary\HasMedia\HasMediaTrait; -use Spatie\MediaLibrary\HasMedia\Interfaces\HasMediaConversions; -use Spatie\MediaLibrary\Media; +use Spatie\MediaLibrary\Models\Media; use Ultraware\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissionContract; use Ultraware\Roles\Traits\HasRoleAndPermission; use Xetaravel\Models\Presenters\UserPresenter; @@ -24,7 +24,7 @@ class User extends Model implements AuthorizableContract, CanResetPasswordContract, HasRoleAndPermissionContract, - HasMediaConversions + HasMedia { use Authenticatable, Authorizable, diff --git a/bootstrap/app.php b/bootstrap/app.php index a8af3e31..139f27b5 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -12,7 +12,7 @@ */ $app = new Illuminate\Foundation\Application( - realpath(__DIR__.'/../') + $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); /* diff --git a/composer.json b/composer.json index c717a1c0..ffd6583f 100644 --- a/composer.json +++ b/composer.json @@ -24,32 +24,33 @@ } ], "require": { - "php": "^7.1.3", - "laravel/framework": "^5.7", - "laravel/tinker": "^1.0", + "php": "^7.2", + "laravel/framework": "^5.8", "laravel/socialite": "^3.0", - "spatie/laravel-medialibrary": "^6.9", - "spatie/laravel-menu": "^3.1", - "spatie/laravel-analytics": "^3.4", - "xetaio/xetaravel-iptraceable": "^1.0", + "laravel/tinker": "^1.0", + "xetaio/recaptcha": "^3.0", + "xetaio/roles": "^5.8", "xetaio/xetaravel-editor-md": "^1.0", + "xetaio/xetaravel-iptraceable": "^1.0", "xetaio/xetaravel-mentions": "^2.0", - "xety/breadcrumbs": "~1.0", + "xety/breadcrumbs": "^1.0", + "spatie/laravel-analytics": "^3.6.4", + "spatie/laravel-medialibrary": "^7.0.0", + "spatie/laravel-menu": "^3.1", + "league/color-extractor": "^0.3.2", + "league/commonmark-ext-table": "^2.0", + "league/commonmark-ext-task-list": "^1.0", + "laravelcollective/html": "^5.8", "fideloper/proxy": "^4.0", - "laravelcollective/html": "^5.6", - "greggilbert/recaptcha": "~2.0", - "kirkbushell/eloquence": "~2.0", - "ultraware/roles": "^5.6", - "rinvex/country": "^3.1", - "graham-campbell/markdown": "^10.0", - "webuni/commonmark-table-extension": "^0.8", - "league/color-extractor": "^0.3.2" + "graham-campbell/markdown": "^11.0", + "kirkbushell/eloquence": "^2.0", + "rinvex/countries": "^6.1" }, "require-dev": { "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0", + "phpunit/phpunit": "^8.0", "symfony/css-selector": "^4.0", "symfony/dom-crawler": "^4.0", "symfony/filesystem": "^4.0", diff --git a/config/analytics.php b/config/analytics.php index 645c59b7..384086bf 100644 --- a/config/analytics.php +++ b/config/analytics.php @@ -23,10 +23,10 @@ 'service_account_credentials_json' => storage_path('app/analytics/service-account-credentials.json'), /* - * The amount of minutes the Google API responses will be cached. + * The amount of seconds the Google API responses will be cached. * If you set this to zero, the responses won't be cached at all. */ - 'cache_lifetime_in_minutes' => 120, + 'cache_lifetime_in_secondes' => 7200, // 2 hours /* * Here you may configure the "store" that the underlying Google_Client will diff --git a/config/app.php b/config/app.php index 4434bca6..899505f3 100644 --- a/config/app.php +++ b/config/app.php @@ -52,6 +52,8 @@ 'url' => env('APP_URL', 'http://localhost'), + 'asset_url' => env('ASSET_URL', null), + /* |-------------------------------------------------------------------------- | Application Timezone @@ -91,6 +93,18 @@ 'fallback_locale' => 'en', + /* + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | + */ + 'faker_locale' => 'en_US', + /* |-------------------------------------------------------------------------- | Encryption Key diff --git a/config/cache.php b/config/cache.php index 1d3de874..84e8f07d 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,4 +1,5 @@ 'laravel', - + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache') ]; diff --git a/config/markdown.php b/config/markdown.php index fad29b7f..fbabef36 100644 --- a/config/markdown.php +++ b/config/markdown.php @@ -39,10 +39,10 @@ */ 'extensions' => [ + League\CommonMark\Ext\TaskList\TaskListExtension::class, Xetaravel\Markdown\Emoji\EmojiExtension::class, Xetaravel\Markdown\Reply\ReplyExtension::class, - Xetaravel\Markdown\Table\TableExtension::class, - Xetaravel\Markdown\TaskLists\TaskListsExtension::class, + Xetaravel\Markdown\Table\TableExtension::class ], /* @@ -144,4 +144,15 @@ 'allow_unsafe_links' => true, + /* + |-------------------------------------------------------------------------- + | Maximum Nesting Level + |-------------------------------------------------------------------------- + | + | This option specifies the maximum permitted block nesting level. + | + | Default: INF + | + */ + 'max_nesting_level' => INF, ]; diff --git a/config/medialibrary.php b/config/medialibrary.php index 6f670c0f..8080afb1 100644 --- a/config/medialibrary.php +++ b/config/medialibrary.php @@ -4,9 +4,9 @@ /* * The filesystems on which to store added files and derived images by default. Choose - * one or more of the filesystems you configured in app/config/filesystems.php + * one or more of the filesystems you've configured in config/filesystems.php. */ - 'default_filesystem' => 'media', + 'disk_name' => 'media', /* * The maximum file size of an item in bytes. Adding a file @@ -23,7 +23,7 @@ /* * The class name of the media model to be used. */ - 'media_model' => Spatie\MediaLibrary\Media::class, + 'media_model' => Spatie\MediaLibrary\Models\Media::class, /* * The engine that will perform the image conversions. @@ -32,15 +32,15 @@ 'image_driver' => 'gd', /* - * When urls to files get generated this class will be called. Leave empty + * When urls to files get generated, this class will be called. Leave empty * if your files are stored locally above the site root or on s3. */ - 'custom_url_generator_class' => null, + 'url_generator' => null, /* * The class that contains the strategy for determining a media file's path. */ - 'custom_path_generator_class' => Xetaravel\MediaLibrary\PathGenerator\XetaravelPathGenerator::class, + 'path_generator' => Xetaravel\MediaLibrary\PathGenerator\XetaravelPathGenerator::class, 's3' => [ /* @@ -68,9 +68,10 @@ */ 'image_generators' => [ Spatie\MediaLibrary\ImageGenerators\FileTypes\Image::class, + Spatie\MediaLibrary\ImageGenerators\FileTypes\Webp::class, Spatie\MediaLibrary\ImageGenerators\FileTypes\Pdf::class, Spatie\MediaLibrary\ImageGenerators\FileTypes\Svg::class, - Spatie\MediaLibrary\ImageGenerators\FileTypes\Video::class, + Spatie\MediaLibrary\ImageGenerators\FileTypes\Video::class ], /* diff --git a/config/queue.php b/config/queue.php index 691a9211..8879a53f 100644 --- a/config/queue.php +++ b/config/queue.php @@ -72,7 +72,7 @@ 'redis' => [ 'driver' => 'redis', 'connection' => 'default', - 'queue' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, ], diff --git a/config/session.php b/config/session.php index 22fd7db7..0aeaf15e 100644 --- a/config/session.php +++ b/config/session.php @@ -1,5 +1,7 @@ 'xetaravel_session', + 'cookie' => Str::slug(env('APP_NAME', 'laravel'), '_').'_session', /* |-------------------------------------------------------------------------- diff --git a/database/migrations/2017_05_02_133801_create_media_table.php b/database/migrations/2017_05_02_133801_create_media_table.php index 45697136..509a4799 100644 --- a/database/migrations/2017_05_02_133801_create_media_table.php +++ b/database/migrations/2017_05_02_133801_create_media_table.php @@ -12,16 +12,17 @@ class CreateMediaTable extends Migration public function up() { Schema::create('media', function (Blueprint $table) { - $table->increments('id')->unsigned(); + $table->bigIncrements('id'); $table->morphs('model'); $table->string('collection_name'); $table->string('name'); $table->string('file_name'); $table->string('mime_type')->nullable(); $table->string('disk'); - $table->unsignedInteger('size'); - $table->text('manipulations'); - $table->text('custom_properties'); + $table->unsignedBigInteger('size'); + $table->json('manipulations'); + $table->json('custom_properties'); + $table->json('responsive_images'); $table->unsignedInteger('order_column')->nullable(); $table->nullableTimestamps(); }); diff --git a/vagrant-ssh.bat b/vagrant-ssh.bat new file mode 100644 index 00000000..ff4bc7ae --- /dev/null +++ b/vagrant-ssh.bat @@ -0,0 +1 @@ +ssh -t serverpilot@192.168.56.101 "cd /srv/users/serverpilot/apps/0website/public ; bash"