Completed
Push — master ( 872cc5...a1b8a3 )
by ARCANEDEV
10s
created

Blog::publishMigrations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
ccs 0
cts 3
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Blog;
2
3
use Illuminate\Support\Facades\Route;
4
use Arcanesoft\Blog\Http\Routes\Front as Routes;
5
6
/**
7
 * Class     Blog
8
 *
9
 * @package  Arcanesoft\Blog
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class Blog
13
{
14
    /* -----------------------------------------------------------------
15
     |  Properties
16
     | -----------------------------------------------------------------
17
     */
18
    /**
19
     * Indicates if migrations will be run.
20
     *
21
     * @var bool
22
     */
23
    public static $runsMigrations = true;
24
25
    /* -----------------------------------------------------------------
26
     |  Main Methods
27
     | -----------------------------------------------------------------
28
     */
29
    /**
30
     * Publish the migrations.
31
     */
32
    public static function publishMigrations()
33
    {
34
        static::$runsMigrations = false;
35
    }
36
37
    /**
38
     * Register the public blog routes.
39
     */
40
    public static function routes()
41
    {
42
        Route::middleware('web')
43
            ->name('public::blog.')
44
            ->prefix('blog')
45
            ->namespace('Arcanesoft\\Blog\\Http\\Controllers\\Front')
46
            ->group(function () {
47
                Routes\PostsRoutes::register();
48
                Routes\CategoriesRoutes::register();
49
                Routes\TagsRoutes::register();
50
            });
51
    }
52
}
53