@@ -9,7 +9,7 @@ |
||
| 9 | 9 | /** |
| 10 | 10 | * @var array |
| 11 | 11 | */ |
| 12 | - protected $sections = []; |
|
| 12 | + protected $sections = [ ]; |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * Register the service provider. |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | 'select' => \SleepingOwl\Admin\Display\Column\Filter\Select::class, |
| 28 | 28 | ]); |
| 29 | 29 | |
| 30 | - $this->app->singleton('sleeping_owl.column_filter', function () use ($alias) { |
|
| 30 | + $this->app->singleton('sleeping_owl.column_filter', function() use ($alias) { |
|
| 31 | 31 | return $alias; |
| 32 | 32 | }); |
| 33 | 33 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | 'tree' => \SleepingOwl\Admin\Display\DisplayTree::class, |
| 44 | 44 | ]); |
| 45 | 45 | |
| 46 | - $this->app->singleton('sleeping_owl.display', function () use ($alias) { |
|
| 46 | + $this->app->singleton('sleeping_owl.display', function() use ($alias) { |
|
| 47 | 47 | return $alias; |
| 48 | 48 | }); |
| 49 | 49 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | 'treeControl' => \SleepingOwl\Admin\Display\Column\TreeControl::class, |
| 69 | 69 | ]); |
| 70 | 70 | |
| 71 | - $this->app->singleton('sleeping_owl.table.column', function () use ($alias) { |
|
| 71 | + $this->app->singleton('sleeping_owl.table.column', function() use ($alias) { |
|
| 72 | 72 | return $alias; |
| 73 | 73 | }); |
| 74 | 74 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | 'checkbox' => \SleepingOwl\Admin\Display\Column\Editable\Checkbox::class, |
| 80 | 80 | ]); |
| 81 | 81 | |
| 82 | - $this->app->singleton('sleeping_owl.table.column.editable', function () use ($alias) { |
|
| 82 | + $this->app->singleton('sleeping_owl.table.column.editable', function() use ($alias) { |
|
| 83 | 83 | return $alias; |
| 84 | 84 | }); |
| 85 | 85 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | 'html' => \SleepingOwl\Admin\Form\Element\Html::class, |
| 112 | 112 | ]); |
| 113 | 113 | |
| 114 | - $this->app->singleton('sleeping_owl.form.element', function () use ($alias) { |
|
| 114 | + $this->app->singleton('sleeping_owl.form.element', function() use ($alias) { |
|
| 115 | 115 | return $alias; |
| 116 | 116 | }); |
| 117 | 117 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | 'panel' => \SleepingOwl\Admin\Form\FormPanel::class, |
| 125 | 125 | ]); |
| 126 | 126 | |
| 127 | - $this->app->singleton('sleeping_owl.form', function () use ($alias) { |
|
| 127 | + $this->app->singleton('sleeping_owl.form', function() use ($alias) { |
|
| 128 | 128 | return $alias; |
| 129 | 129 | }); |
| 130 | 130 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | 'related' => \SleepingOwl\Admin\Display\Filter\FilterRelated::class, |
| 139 | 139 | ]); |
| 140 | 140 | |
| 141 | - $this->app->singleton('sleeping_owl.display.filter', function () use ($alias) { |
|
| 141 | + $this->app->singleton('sleeping_owl.display.filter', function() use ($alias) { |
|
| 142 | 142 | return $alias; |
| 143 | 143 | }); |
| 144 | 144 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * @var array |
| 11 | 11 | */ |
| 12 | - protected static $routes = []; |
|
| 12 | + protected static $routes = [ ]; |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * @return array |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * @var array |
| 24 | 24 | */ |
| 25 | - protected $aliases = []; |
|
| 25 | + protected $aliases = [ ]; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Register new alias. |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function add($alias, $class) |
| 36 | 36 | { |
| 37 | - $this->aliases[$alias] = $class; |
|
| 37 | + $this->aliases[ $alias ] = $class; |
|
| 38 | 38 | |
| 39 | 39 | if (method_exists($class, 'registerRoutes')) { |
| 40 | - self::$routes[] = [$class, 'registerRoutes']; |
|
| 40 | + self::$routes[ ] = [ $class, 'registerRoutes' ]; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $this; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function getAlias($alias) |
| 68 | 68 | { |
| 69 | - return $this->aliases[$alias]; |
|
| 69 | + return $this->aliases[ $alias ]; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function __call($name, $arguments) |
| 93 | 93 | { |
| 94 | - if (! $this->hasAlias($name)) { |
|
| 94 | + if (!$this->hasAlias($name)) { |
|
| 95 | 95 | throw new BadMethodCallException($name); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * Eager loading relations. |
| 26 | 26 | * @var string[] |
| 27 | 27 | */ |
| 28 | - protected $with = []; |
|
| 28 | + protected $with = [ ]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * @param string $class |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function with($with) |
| 74 | 74 | { |
| 75 | - if (! is_array($with)) { |
|
| 75 | + if (!is_array($with)) { |
|
| 76 | 76 | $with = func_get_args(); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | public function hasColumn($column) |
| 179 | 179 | { |
| 180 | 180 | $table = $this->getModel()->getTable(); |
| 181 | - $columns = Cache::remember('admin.columns.'.$table, 60, function () use ($table) { |
|
| 181 | + $columns = Cache::remember('admin.columns.'.$table, 60, function() use ($table) { |
|
| 182 | 182 | return Schema::getColumnListing($table); |
| 183 | 183 | }); |
| 184 | 184 | |
@@ -62,6 +62,6 @@ |
||
| 62 | 62 | | |
| 63 | 63 | */ |
| 64 | 64 | |
| 65 | - 'attributes' => [], |
|
| 65 | + 'attributes' => [ ], |
|
| 66 | 66 | |
| 67 | 67 | ]; |
@@ -87,6 +87,6 @@ |
||
| 87 | 87 | | |
| 88 | 88 | */ |
| 89 | 89 | |
| 90 | - 'attributes' => [], |
|
| 90 | + 'attributes' => [ ], |
|
| 91 | 91 | |
| 92 | 92 | ]; |
@@ -87,6 +87,6 @@ |
||
| 87 | 87 | | |
| 88 | 88 | */ |
| 89 | 89 | |
| 90 | - 'attributes' => [], |
|
| 90 | + 'attributes' => [ ], |
|
| 91 | 91 | |
| 92 | 92 | ]; |
@@ -87,6 +87,6 @@ |
||
| 87 | 87 | | |
| 88 | 88 | */ |
| 89 | 89 | |
| 90 | - 'attributes' => [], |
|
| 90 | + 'attributes' => [ ], |
|
| 91 | 91 | |
| 92 | 92 | ]; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$router->group(['as' => 'admin.', 'namespace' => 'SleepingOwl\Admin\Http\Controllers'], function ($router) { |
|
| 3 | +$router->group([ 'as' => 'admin.', 'namespace' => 'SleepingOwl\Admin\Http\Controllers' ], function($router) { |
|
| 4 | 4 | $router->get('{adminModel}', [ |
| 5 | 5 | 'as' => 'model', |
| 6 | 6 | 'uses' => 'AdminController@getDisplay', |