We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Backpack\CRUD; |
| 3 | 3 | |
| 4 | 4 | use Illuminate\Support\ServiceProvider; |
| 5 | -use Illuminate\Routing\Router; |
|
| 6 | 5 | use Route; |
| 7 | 6 | |
| 8 | 7 | class CrudServiceProvider extends ServiceProvider |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | <!-- elFinder JS (REQUIRED) --> |
| 18 | 18 | <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script> |
| 19 | 19 | |
| 20 | - <?php if($locale){ ?> |
|
| 20 | + <?php if ($locale) { ?> |
|
| 21 | 21 | <!-- elFinder translation (OPTIONAL) --> |
| 22 | 22 | <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script> |
| 23 | 23 | <?php } ?> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $().ready(function() { |
| 41 | 41 | var elf = $('#elfinder').elfinder({ |
| 42 | 42 | // set your elFinder options here |
| 43 | - <?php if($locale){ ?> |
|
| 43 | + <?php if ($locale) { ?> |
|
| 44 | 44 | lang: '<?= $locale ?>', // locale |
| 45 | 45 | <?php } ?> |
| 46 | 46 | customData: { |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | <!-- elFinder JS (REQUIRED) --> |
| 18 | 18 | <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script> |
| 19 | 19 | |
| 20 | - <?php if($locale){ ?> |
|
| 20 | + <?php if ($locale) { ?> |
|
| 21 | 21 | <!-- elFinder translation (OPTIONAL) --> |
| 22 | 22 | <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script> |
| 23 | 23 | <?php } ?> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $().ready(function() { |
| 41 | 41 | var elf = $('#elfinder').elfinder({ |
| 42 | 42 | // set your elFinder options here |
| 43 | - <?php if($locale){ ?> |
|
| 43 | + <?php if ($locale) { ?> |
|
| 44 | 44 | lang: '<?= $locale ?>', // locale |
| 45 | 45 | <?php } ?> |
| 46 | 46 | customData: { |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | <!-- elFinder JS (REQUIRED) --> |
| 18 | 18 | <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script> |
| 19 | 19 | |
| 20 | - <?php if($locale){ ?> |
|
| 20 | + <?php if ($locale) { ?> |
|
| 21 | 21 | <!-- elFinder translation (OPTIONAL) --> |
| 22 | 22 | <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script> |
| 23 | 23 | <?php } ?> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $().ready(function() { |
| 41 | 41 | var elf = $('#elfinder').elfinder({ |
| 42 | 42 | // set your elFinder options here |
| 43 | - <?php if($locale){ ?> |
|
| 43 | + <?php if ($locale) { ?> |
|
| 44 | 44 | lang: '<?= $locale ?>', // locale |
| 45 | 45 | <?php } ?> |
| 46 | 46 | customData: { |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | <!-- elFinder JS (REQUIRED) --> |
| 18 | 18 | <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script> |
| 19 | 19 | |
| 20 | - <?php if($locale){ ?> |
|
| 20 | + <?php if ($locale) { ?> |
|
| 21 | 21 | <!-- elFinder translation (OPTIONAL) --> |
| 22 | 22 | <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script> |
| 23 | 23 | <?php } ?> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $().ready(function() { |
| 41 | 41 | var elf = $('#elfinder').elfinder({ |
| 42 | 42 | // set your elFinder options here |
| 43 | - <?php if($locale){ ?> |
|
| 43 | + <?php if ($locale) { ?> |
|
| 44 | 44 | lang: '<?= $locale ?>', // locale |
| 45 | 45 | <?php } ?> |
| 46 | 46 | customData: { |
@@ -12,14 +12,14 @@ |
||
| 12 | 12 | |-------------------------------------------------------------------------- |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | - public static function getPossibleEnumValues($field_name){ |
|
| 15 | + public static function getPossibleEnumValues($field_name) { |
|
| 16 | 16 | $instance = new static; // create an instance of the model to be able to get the table name |
| 17 | - $type = DB::select( DB::raw('SHOW COLUMNS FROM '.$instance->getTable().' WHERE Field = "'.$field_name.'"') )[0]->Type; |
|
| 17 | + $type = DB::select(DB::raw('SHOW COLUMNS FROM '.$instance->getTable().' WHERE Field = "'.$field_name.'"'))[0]->Type; |
|
| 18 | 18 | preg_match('/^enum\((.*)\)$/', $type, $matches); |
| 19 | 19 | $enum = array(); |
| 20 | 20 | $exploded = explode(',', $matches[1]); |
| 21 | - foreach($exploded as $value){ |
|
| 22 | - $v = trim( $value, "'" ); |
|
| 21 | + foreach ($exploded as $value) { |
|
| 22 | + $v = trim($value, "'"); |
|
| 23 | 23 | $enum[] = $v; |
| 24 | 24 | } |
| 25 | 25 | return $enum; |
@@ -1,9 +1,6 @@ |
||
| 1 | 1 | <?php namespace Backpack\CRUD; |
| 2 | 2 | |
| 3 | -use Illuminate\Database\Eloquent\Collection; |
|
| 4 | -use Illuminate\Database\Eloquent\Model; |
|
| 5 | 3 | use DB; |
| 6 | -use Lang; |
|
| 7 | 4 | |
| 8 | 5 | trait CrudTrait { |
| 9 | 6 | |
@@ -3,16 +3,12 @@ |
||
| 3 | 3 | use Illuminate\Foundation\Bus\DispatchesJobs; |
| 4 | 4 | use Illuminate\Routing\Controller as BaseController; |
| 5 | 5 | use Illuminate\Foundation\Validation\ValidatesRequests; |
| 6 | -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
|
| 7 | -use Illuminate\Support\Facades\Form as Form; |
|
| 8 | 6 | use Illuminate\Http\Request; |
| 9 | 7 | use Backpack\CRUD\Crud; |
| 10 | -use Crypt; |
|
| 11 | 8 | use Alert; |
| 12 | 9 | |
| 13 | 10 | |
| 14 | 11 | // VALIDATION: change the requests to match your own file names if you need form validation |
| 15 | -use Backpack\CRUD\app\Http\Requests\CrudRequest as StoreRequest; |
|
| 16 | 12 | use Backpack\CRUD\app\Http\Requests\CrudRequest as UpdateRequest; |
| 17 | 13 | |
| 18 | 14 | class CrudController extends BaseController { |
@@ -1,12 +1,8 @@ |
||
| 1 | 1 | <?php namespace App\Http\Controllers\Admin; |
| 2 | 2 | |
| 3 | -use App\Http\Requests; |
|
| 4 | -use App\Http\Controllers\Controller; |
|
| 5 | 3 | use Backpack\CRUD\app\Http\Controllers\CrudController; |
| 6 | -use Illuminate\Http\Request; |
|
| 7 | 4 | |
| 8 | 5 | // VALIDATION: change the requests to match your own file names if you need form validation |
| 9 | -use Backpack\CRUD\app\Http\Requests\CrudRequest as StoreRequest; |
|
| 10 | 6 | use Backpack\CRUD\app\Http\Requests\CrudRequest as UpdateRequest; |
| 11 | 7 | |
| 12 | 8 | class ExampleCrudController extends CrudController { |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | 'model' => "App\Models\Example" |
| 158 | 158 | ], |
| 159 | 159 | ]; |
| 160 | - $this->crud->fields = [ |
|
| 160 | + $this->crud->fields = [ |
|
| 161 | 161 | [ |
| 162 | 162 | 'name' => 'name', |
| 163 | 163 | 'label' => "Example item text" |
@@ -1,9 +1,6 @@ |
||
| 1 | 1 | <?php namespace Backpack\Crud\app\Http\Controllers; |
| 2 | 2 | |
| 3 | -use Illuminate\Foundation\Bus\DispatchesJobs; |
|
| 4 | 3 | use Illuminate\Routing\Controller as BaseController; |
| 5 | -use Illuminate\Foundation\Validation\ValidatesRequests; |
|
| 6 | -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
|
| 7 | 4 | use Backpack\CRUD\Crud; |
| 8 | 5 | |
| 9 | 6 | /** |