@@ -18,11 +18,11 @@ |
||
| 18 | 18 | { |
| 19 | 19 | parent::boot(); |
| 20 | 20 | |
| 21 | - static::saving(function () { |
|
| 21 | + static::saving(function() { |
|
| 22 | 22 | self::cacheKey(); |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | - static::deleting(function () { |
|
| 25 | + static::deleting(function() { |
|
| 26 | 26 | self::cacheKey(); |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
| 18 | 18 | { |
| 19 | 19 | parent::boot(); |
| 20 | 20 | |
| 21 | - static::saving(function () { |
|
| 21 | + static::saving(function() { |
|
| 22 | 22 | self::cacheKey(); |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | - static::deleting(function () { |
|
| 25 | + static::deleting(function() { |
|
| 26 | 26 | self::cacheKey(); |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -120,15 +120,15 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | // Publish Config File |
| 122 | 122 | $this->publishes([ |
| 123 | - __DIR__ . '/../../config/website.php' => config_path('website.php'), |
|
| 123 | + __DIR__.'/../../config/website.php' => config_path('website.php'), |
|
| 124 | 124 | ], 'website-config'); |
| 125 | 125 | // Publish View Files |
| 126 | 126 | $this->publishes([ |
| 127 | - __DIR__ . '/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'), |
|
| 127 | + __DIR__.'/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'), |
|
| 128 | 128 | ], 'website-views'); |
| 129 | 129 | // Publish Migration Files |
| 130 | 130 | $this->publishes([ |
| 131 | - __DIR__ . '/../../database/migrations' => database_path('migrations'), |
|
| 131 | + __DIR__.'/../../database/migrations' => database_path('migrations'), |
|
| 132 | 132 | ], 'website-migrations'); |
| 133 | 133 | } |
| 134 | 134 | |
@@ -139,8 +139,8 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | protected function registerResource() |
| 141 | 141 | { |
| 142 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Loading Migration Files |
|
| 143 | - $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'website'); // Loading Views Files |
|
| 142 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); // Loading Migration Files |
|
| 143 | + $this->loadViewsFrom(__DIR__.'/../../resources/views', 'website'); // Loading Views Files |
|
| 144 | 144 | $this->registerRoutes(); |
| 145 | 145 | } |
| 146 | 146 | |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | protected function registerRoutes() |
| 165 | 165 | { |
| 166 | - Route::group($this->routeConfiguration(), function () { |
|
| 167 | - $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php'); |
|
| 166 | + Route::group($this->routeConfiguration(), function() { |
|
| 167 | + $this->loadRoutesFrom(__DIR__.'/../../routes/web.php'); |
|
| 168 | 168 | }); |
| 169 | 169 | } |
| 170 | 170 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | public function indexTemplate() |
| 14 | 14 | { |
| 15 | 15 | $templates = config('adminetic.caching', true) |
| 16 | - ? (Cache::has('templates') ? Cache::get('templates') : Cache::rememberForever('templates', function () { |
|
| 16 | + ? (Cache::has('templates') ? Cache::get('templates') : Cache::rememberForever('templates', function() { |
|
| 17 | 17 | return Template::latest()->get(); |
| 18 | 18 | })) |
| 19 | 19 | : Template::latest()->get(); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | $posts = Cache::get('posts', Post::with('category', 'author', 'tagged')->latest()->get()); |
| 14 | 14 | |
| 15 | - return $posts->sortByDesc(function ($p) use ($post) { |
|
| 15 | + return $posts->sortByDesc(function($p) use ($post) { |
|
| 16 | 16 | $post_tags = $post->tags->pluck('name')->toArray(); |
| 17 | 17 | $tag_weight = $p->withAnyTag($post_tags)->exists() ? (5 / 100) * $p->weight : 0; |
| 18 | 18 | $category_weight = $p->category->id == $post->category_id ? (10 / 100) * $p->weight : 0; |
@@ -18,11 +18,11 @@ |
||
| 18 | 18 | { |
| 19 | 19 | parent::boot(); |
| 20 | 20 | |
| 21 | - static::saving(function () { |
|
| 21 | + static::saving(function() { |
|
| 22 | 22 | self::cacheKey(); |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | - static::deleting(function () { |
|
| 25 | + static::deleting(function() { |
|
| 26 | 26 | self::cacheKey(); |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
| 18 | 18 | { |
| 19 | 19 | parent::boot(); |
| 20 | 20 | |
| 21 | - static::saving(function () { |
|
| 21 | + static::saving(function() { |
|
| 22 | 22 | self::cacheKey(); |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | - static::deleting(function () { |
|
| 25 | + static::deleting(function() { |
|
| 26 | 26 | self::cacheKey(); |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('posts', function (Blueprint $table) { |
|
| 16 | + Schema::create('posts', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->string('slug')->unique(); |
| 19 | 19 | $table->string('code')->unique(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('templates', function (Blueprint $table) { |
|
| 16 | + Schema::create('templates', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->string('name'); |
| 19 | 19 | $table->text('template'); |