@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('todos', function (Blueprint $table) { |
|
| 16 | + Schema::create('todos', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->unsignedBigInteger('user_id'); |
| 19 | 19 | $table->string('title'); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public function delete() |
| 33 | 33 | { |
| 34 | 34 | $this->todo->delete(); |
| 35 | - $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => __('DeletedMessage', ['name' => __('Todo') ] )]); |
|
| 35 | + $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => __('DeletedMessage', ['name' => __('Todo')])]); |
|
| 36 | 36 | $this->emit('todoDeleted'); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | $this->validate(); |
| 25 | 25 | $this->emit('todoCreated'); |
| 26 | - $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CreatedMessage', ['name' => __('Todo') ])]); |
|
| 26 | + $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CreatedMessage', ['name' => __('Todo')])]); |
|
| 27 | 27 | |
| 28 | 28 | Todo::create([ |
| 29 | 29 | 'title' => $this->title, |
@@ -28,12 +28,12 @@ discard block |
||
| 28 | 28 | $this->action = $action; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function render(){ |
|
| 31 | + public function render() { |
|
| 32 | 32 | $name = $this->name; |
| 33 | 33 | |
| 34 | 34 | // Create an instance of input class |
| 35 | 35 | // then call handle() method to get input as a steing |
| 36 | - if(!is_array($this->type)) { |
|
| 36 | + if (!is_array($this->type)) { |
|
| 37 | 37 | $inputStringClass = static::classMap[$this->type]; |
| 38 | 38 | $input = (new $inputStringClass())->handle($name); |
| 39 | 39 | } else { |
@@ -44,14 +44,14 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // render all input element |
| 47 | - if($this->type != 'checkbox') { |
|
| 47 | + if ($this->type != 'checkbox') { |
|
| 48 | 48 | $title = ucfirst($name); |
| 49 | 49 | $str = " |
| 50 | 50 | <!-- $title Input --> |
| 51 | 51 | <div class='form-group'> |
| 52 | 52 | <label for='input$name' class='col-sm-2 control-label'> {{ __('$title') }}</label> |
| 53 | 53 | $input |
| 54 | - @error('$name') <div class='invalid-feedback'>{{ " . '$message' . " }}</div> @enderror |
|
| 54 | + @error('$name') <div class='invalid-feedback'>{{ ".'$message'." }}</div> @enderror |
|
| 55 | 55 | </div> |
| 56 | 56 | "; |
| 57 | 57 | return $str; |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | <input $mode='$name' class='form-check-input' type='checkbox' id='input$name'> |
| 17 | 17 | <label class='form-check-label' for='input$name'>{{ __('$UName') }}</label> |
| 18 | 18 | </div> |
| 19 | - @error('$name') <div class='invalid-feedback'>{{ " . '$message' . " }}</div> @enderror |
|
| 19 | + @error('$name') <div class='invalid-feedback'>{{ ".'$message'." }}</div> @enderror |
|
| 20 | 20 | </div> |
| 21 | 21 | "; |
| 22 | 22 | } |
@@ -15,14 +15,14 @@ |
||
| 15 | 15 | public function handle() |
| 16 | 16 | { |
| 17 | 17 | $user = $this->argument('user'); |
| 18 | - try{ |
|
| 18 | + try { |
|
| 19 | 19 | $status = UserProviderFacade::makeAdmin($user); |
| 20 | - if($status){ |
|
| 20 | + if ($status) { |
|
| 21 | 21 | $this->info("User {$user} was converted to an admin"); |
| 22 | 22 | return; |
| 23 | 23 | } |
| 24 | 24 | $this->warn("It was failed, be sure your column is fillable."); |
| 25 | - } catch (\Exception $exception){ |
|
| 25 | + } catch (\Exception $exception) { |
|
| 26 | 26 | $this->error("User {$user} does not exist"); |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | $admins = UserProviderFacade::getAdmins(); |
| 20 | 20 | $this->warn('Admin Lists :'); |
| 21 | - foreach ($admins as $admin){ |
|
| 21 | + foreach ($admins as $admin) { |
|
| 22 | 22 | $this->warn("• {$admin->name}: {$admin->email}"); |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | $user = $this->argument('user'); |
| 20 | 20 | |
| 21 | - if($this->askResult($user)){ |
|
| 21 | + if ($this->askResult($user)) { |
|
| 22 | 22 | UserProviderFacade::deleteAdmin($user); |
| 23 | 23 | $this->info('Admin was removed successfully'); |
| 24 | 24 | return; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | public function askResult($user) |
| 31 | 31 | { |
| 32 | - if($this->option('force')) { |
|
| 32 | + if ($this->option('force')) { |
|
| 33 | 33 | return true; |
| 34 | 34 | } |
| 35 | 35 | $result = $this->confirm("Do you want to remove {$user} from administration", 'yes'); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $user = $this->findUser($id); |
| 13 | 13 | $modelInstance = app()->make(config('easy_panel.user_model')); |
| 14 | 14 | $column = config('easy_panel.column'); |
| 15 | - if(in_array($column, $modelInstance->getFillable()) or !in_array($column, $modelInstance->getGuarded())) { |
|
| 15 | + if (in_array($column, $modelInstance->getFillable()) or !in_array($column, $modelInstance->getGuarded())) { |
|
| 16 | 16 | $user->update([ |
| 17 | 17 | config('easy_panel.column') => 1 |
| 18 | 18 | ]); |