@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | public function up() |
11 | 11 | { |
12 | - Schema::create('social_accounts', function (Blueprint $table) { |
|
12 | + Schema::create('social_accounts', function(Blueprint $table) { |
|
13 | 13 | $table->increments('id'); |
14 | 14 | $table->integer('user_id')->unsigned()->nullable()->index(); |
15 | 15 | $table->string('provider')->index(); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function up() |
23 | 23 | { |
24 | - Schema::create($this->table_menus, function (Blueprint $table) { |
|
24 | + Schema::create($this->table_menus, function(Blueprint $table) { |
|
25 | 25 | $table->increments('id'); |
26 | 26 | $table->string('name')->index(); |
27 | 27 | $table->string('permission')->nullable()->index(); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function up() |
22 | 22 | { |
23 | - Schema::create($this->table_attachments, function (Blueprint $table) { |
|
23 | + Schema::create($this->table_attachments, function(Blueprint $table) { |
|
24 | 24 | $table->increments('id'); |
25 | 25 | $table->string('name'); |
26 | 26 | $table->string('original_name'); |
@@ -37,12 +37,12 @@ |
||
37 | 37 | |
38 | 38 | public function create(Permissions $permissions) |
39 | 39 | { |
40 | - return view('back-project::roles.create')->with('permissions', $permissions->all()); |
|
40 | + return view('back-project::roles.create')->with('permissions', $permissions->all()); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | public function store(RoleAdd $request, Roles $roles) |
44 | 44 | { |
45 | - $role= $roles->create($request->all()); |
|
45 | + $role = $roles->create($request->all()); |
|
46 | 46 | |
47 | 47 | Alert::add('success', trans('back-project::crud.model_created', ['model' => trans('back-project::roles.role')]))->flash(); |
48 | 48 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | public function store(PermissionAdd $request, Permissions $permissions) |
44 | 44 | { |
45 | - $permission= $permissions->create($request->all()); |
|
45 | + $permission = $permissions->create($request->all()); |
|
46 | 46 | |
47 | 47 | Alert::add('success', trans('back-project::crud.model_created', ['model' => trans('back-project::permissions.permission')]))->flash(); |
48 | 48 |
@@ -91,7 +91,7 @@ |
||
91 | 91 | <a href="%s"><i class="%s text-red"></i><span>%s</span></a> |
92 | 92 | ' // url, icon, title |
93 | 93 | ]; |
94 | - $traverse = function ($rows) use (&$traverse, $templates, $user) { |
|
94 | + $traverse = function($rows) use (&$traverse, $templates, $user) { |
|
95 | 95 | $menuString = ""; |
96 | 96 | $hasActive = false; |
97 | 97 | foreach ($rows as $menu) { |
@@ -22,11 +22,11 @@ |
||
22 | 22 | return redirect()->guest('login'); |
23 | 23 | } |
24 | 24 | |
25 | - if (! $request->user()->hasRole($role)) { |
|
25 | + if (!$request->user()->hasRole($role)) { |
|
26 | 26 | abort(403); |
27 | 27 | } |
28 | 28 | |
29 | - if (!empty($permission) and ! $request->user()->can($permission)) { |
|
29 | + if (!empty($permission) and !$request->user()->can($permission)) { |
|
30 | 30 | abort(403); |
31 | 31 | } |
32 | 32 |
@@ -34,13 +34,13 @@ discard block |
||
34 | 34 | // - first the published views (in case they have any changes) |
35 | 35 | $this->loadViewsFrom(resource_path('views/vendor/back-project/base'), 'back-project'); |
36 | 36 | // - then the stock views that come with the package, in case a published view might be missing |
37 | - $this->loadViewsFrom(__DIR__ . '/../resources/views', 'back-project'); |
|
37 | + $this->loadViewsFrom(__DIR__.'/../resources/views', 'back-project'); |
|
38 | 38 | // Load Translations |
39 | - $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'back-project'); |
|
39 | + $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'back-project'); |
|
40 | 40 | |
41 | 41 | // use the vendor configuration file as fallback |
42 | 42 | $this->mergeConfigFrom( |
43 | - __DIR__ . '/../config/config.php', 'back-project' |
|
43 | + __DIR__.'/../config/config.php', 'back-project' |
|
44 | 44 | ); |
45 | 45 | |
46 | 46 | $this->routes($router); |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | return new BackProject($app); |
65 | 65 | });*/ |
66 | 66 | |
67 | - $this->app->singleton('attachments-manager', function ($app) { |
|
67 | + $this->app->singleton('attachments-manager', function($app) { |
|
68 | 68 | return new MediaManager(); |
69 | 69 | }); |
70 | 70 | |
71 | - $this->app->singleton('back-project', function ($app) { |
|
71 | + $this->app->singleton('back-project', function($app) { |
|
72 | 72 | return new BackProject(); |
73 | 73 | }); |
74 | 74 | |
@@ -105,15 +105,15 @@ discard block |
||
105 | 105 | public function publishFiles() |
106 | 106 | { |
107 | 107 | // publish config file |
108 | - $this->publishes([__DIR__ . '/../config/config.php' => config_path() . '/back-project.php'], 'config'); |
|
108 | + $this->publishes([__DIR__.'/../config/config.php' => config_path().'/back-project.php'], 'config'); |
|
109 | 109 | // publish lang files |
110 | - $this->publishes([__DIR__ . '/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang'); |
|
110 | + $this->publishes([__DIR__.'/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang'); |
|
111 | 111 | // publish public Backpack assets |
112 | - $this->publishes([__DIR__ . '/../public' => public_path('vendor/back-project')], 'public'); |
|
112 | + $this->publishes([__DIR__.'/../public' => public_path('vendor/back-project')], 'public'); |
|
113 | 113 | // publish views |
114 | - $this->publishes([__DIR__ . '/../resources/views' => resource_path('views/vendor/back-project')], 'views'); |
|
114 | + $this->publishes([__DIR__.'/../resources/views' => resource_path('views/vendor/back-project')], 'views'); |
|
115 | 115 | // publish error views |
116 | - $this->publishes([__DIR__ . '/../resources/error_views' => resource_path('views/errors')], 'errors'); |
|
116 | + $this->publishes([__DIR__.'/../resources/error_views' => resource_path('views/errors')], 'errors'); |
|
117 | 117 | // publish public AdminLTE assets |
118 | 118 | $this->publishes(['vendor/almasaeed2010/adminlte/bootstrap' => public_path('vendor/adminlte/bootstrap')], 'adminlte'); |
119 | 119 | $this->publishes(['vendor/almasaeed2010/adminlte/dist' => public_path('vendor/adminlte/dist')], 'adminlte'); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | //$router->aliasMiddleware('guest', \Afrittella\BackProject\Http\Middleware\RedirectIfAuthenticated::class); |
129 | 129 | $router->aliasMiddleware('role', \Afrittella\BackProject\Http\Middleware\Role::class); |
130 | 130 | |
131 | - $this->loadRoutesFrom(__DIR__ . '/../routes/web.php'); |
|
131 | + $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | public function handleMigrations() |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | $timestamp = date('Y_m_d_His', time()); |
139 | 139 | |
140 | 140 | $this->publishes([ |
141 | - __DIR__ . '/../database/migrations/' . $file . '.php' => |
|
142 | - database_path('migrations/' . $timestamp . '_' . $file . '.php') |
|
141 | + __DIR__.'/../database/migrations/'.$file.'.php' => |
|
142 | + database_path('migrations/'.$timestamp.'_'.$file.'.php') |
|
143 | 143 | ], 'migrations'); |
144 | 144 | } |
145 | 145 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | public function loadHelpers() |
180 | 180 | { |
181 | 181 | foreach ($this->helpers as $helper): |
182 | - $file = __DIR__ . '/Helpers/' . $helper . '.php'; |
|
182 | + $file = __DIR__.'/Helpers/'.$helper.'.php'; |
|
183 | 183 | |
184 | 184 | if (file_exists($file)) { |
185 | 185 | require_once($file); |
@@ -51,7 +51,7 @@ |
||
51 | 51 | { |
52 | 52 | $format = $this->chooseFormat($format); |
53 | 53 | |
54 | - return '<img src="'.$this->getCachedImageUrl($format, $image->name).'" alt="'.$image->description.'" '.$attributes. '>'; |
|
54 | + return '<img src="'.$this->getCachedImageUrl($format, $image->name).'" alt="'.$image->description.'" '.$attributes.'>'; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | protected function chooseFormat($format) |