@@ -20,9 +20,9 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function indexRender($row, $column) |
| 22 | 22 | { |
| 23 | - if($column->getFormat()) { |
|
| 23 | + if ($column->getFormat()) { |
|
| 24 | 24 | return date($column->getFormat(), strtotime($row->{$column->getField()})); |
| 25 | - }else{ |
|
| 25 | + } else { |
|
| 26 | 26 | return $row->{$column->getField()}; |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('cb_menus', function (Blueprint $table) { |
|
| 15 | + Schema::create('cb_menus', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments("id"); |
| 17 | 17 | $table->string('name'); |
| 18 | 18 | $table->string("icon")->nullable(); |
@@ -20,9 +20,9 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function indexRender($row, $column) |
| 22 | 22 | { |
| 23 | - if($column->getFormat()) { |
|
| 23 | + if ($column->getFormat()) { |
|
| 24 | 24 | return date($column->getFormat(), strtotime($row->{$column->getField()})); |
| 25 | - }else{ |
|
| 25 | + } else { |
|
| 26 | 26 | return $row->{$column->getField()}; |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace crocodicstudio\crudbooster\helpers; |
| 3 | 3 | |
| 4 | -class UserSession { |
|
| 4 | +class UserSession { |
|
| 5 | 5 | |
| 6 | 6 | public function user() |
| 7 | 7 | { |
@@ -21,14 +21,14 @@ discard block |
||
| 21 | 21 | public function photo() |
| 22 | 22 | { |
| 23 | 23 | $user = $this->user(); |
| 24 | - return ($user->photo)?asset($user->photo):asset(dummyPhoto()); |
|
| 24 | + return ($user->photo) ?asset($user->photo) : asset(dummyPhoto()); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function roleName() |
| 28 | 28 | { |
| 29 | 29 | $user = $this->user(); |
| 30 | 30 | $role = cb()->find("cb_roles", $user->cb_roles_id); |
| 31 | - if($role) return $role->name; |
|
| 31 | + if ($role) return $role->name; |
|
| 32 | 32 | else return null; |
| 33 | 33 | } |
| 34 | 34 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function detailRender($row, $column) |
| 29 | 29 | { |
| 30 | 30 | $column->setValue($row->{ $column->getField() }); |
| 31 | - return view("types::image.detail",[ |
|
| 31 | + return view("types::image.detail", [ |
|
| 32 | 32 | 'row'=>$row, |
| 33 | 33 | 'column'=>$column |
| 34 | 34 | ]); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | public function indexRender($row, $column) |
| 38 | 38 | { |
| 39 | 39 | $column->setValue($row->{ $column->getField() }); |
| 40 | - return view("types::image.index",[ |
|
| 40 | + return view("types::image.index", [ |
|
| 41 | 41 | 'row'=>$row, |
| 42 | 42 | 'column'=>$column |
| 43 | 43 | ]); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | public function detailRender($row, $column) |
| 28 | 28 | { |
| 29 | 29 | $column->setValue($row->{ $column->getField() }); |
| 30 | - return view("types::file.detail",[ |
|
| 30 | + return view("types::file.detail", [ |
|
| 31 | 31 | 'row'=>$row, |
| 32 | 32 | 'column'=>$column |
| 33 | 33 | ]); |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | <?php /** @var \crocodicstudio\crudbooster\types\radio\RadioModel $column */ ?> |
| 3 | 3 | @foreach($column->getOptions() as $key=>$value) |
| 4 | 4 | <?php |
| 5 | - $columnValue = old($column->getName())?:($column->getDefaultValue())?:$column->getValue(); |
|
| 5 | + $columnValue = old($column->getName()) ?: ($column->getDefaultValue()) ?: $column->getValue(); |
|
| 6 | 6 | ?> |
| 7 | 7 | <div class="{{ $column->getDisabled()?"disabled":"" }}"> |
| 8 | 8 | <label class='radio-inline'> |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | public function indexRender($row, $column) |
| 23 | 23 | { |
| 24 | 24 | $value = trim(strip_tags($row->{ $column->getField() })); |
| 25 | - if($column->getLimit()) { |
|
| 25 | + if ($column->getLimit()) { |
|
| 26 | 26 | $value = Str::limit($value, $column->getLimit()); |
| 27 | 27 | } |
| 28 | 28 | return $value; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function assignment($value, $column) |
| 22 | 22 | { |
| 23 | - return @implode(";", request( $column->getName() )); |
|
| 23 | + return @implode(";", request($column->getName())); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |