Code format

This commit is contained in:
Edward Yang 2023-03-09 16:58:51 +08:00
parent 56f17772ca
commit 7eb8fe3477
4 changed files with 15 additions and 18 deletions

View File

@ -26,15 +26,15 @@ class Input extends Component
public function __construct(string $name, string $title, string $value, bool $required = false, string $error = '', string $width = '400', string $type = 'text', string $step = '', string $placeholder = '') public function __construct(string $name, string $title, string $value, bool $required = false, string $error = '', string $width = '400', string $type = 'text', string $step = '', string $placeholder = '')
{ {
$this->name = $name; $this->name = $name;
$this->title = $title; $this->title = $title;
$this->value = html_entity_decode($value, ENT_QUOTES); $this->value = html_entity_decode($value, ENT_QUOTES);
$this->error = $error; $this->error = $error;
$this->width = $width; $this->width = $width;
$this->placeholder = $placeholder; $this->placeholder = $placeholder;
$this->type = $type; $this->type = $type;
$this->step = $step; $this->step = $step;
$this->required = $required; $this->required = $required;
} }
public function render() public function render()

View File

@ -22,12 +22,12 @@ class InputLocale extends Component
public function __construct(string $name, string $title, $value, string $width = '400', bool $required = false, string $placeholder = '') public function __construct(string $name, string $title, $value, string $width = '400', bool $required = false, string $placeholder = '')
{ {
$this->name = $name; $this->name = $name;
$this->title = $title; $this->title = $title;
$this->width = $width; $this->width = $width;
$this->placeholder = $placeholder; $this->placeholder = $placeholder;
$this->value = $value; $this->value = $value;
$this->required = $required; $this->required = $required;
} }
public function render() public function render()

View File

@ -19,13 +19,13 @@ use Beike\Models\ProductCategory;
use Beike\Models\ProductDescription; use Beike\Models\ProductDescription;
use Beike\Models\ProductRelation; use Beike\Models\ProductRelation;
use Beike\Models\ProductSku; use Beike\Models\ProductSku;
use Illuminate\Support\Facades\DB;
use Beike\Shop\Http\Resources\ProductSimple; use Beike\Shop\Http\Resources\ProductSimple;
use Illuminate\Contracts\Pagination\LengthAwarePaginator; use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\HigherOrderBuilderProxy; use Illuminate\Database\Eloquent\HigherOrderBuilderProxy;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection; use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Support\Facades\DB;
class ProductRepo class ProductRepo
{ {

View File

@ -19,11 +19,8 @@ class Bootstrap
add_hook_blade('admin.plugin.form', function ($callback, $output, $data) { add_hook_blade('admin.plugin.form', function ($callback, $output, $data) {
$code = $data['plugin']->code; $code = $data['plugin']->code;
if ($code == 'social') { if ($code == 'social') {
$view = view('Social::admin.config_form', $data)->render(); return view('Social::admin.config_form', $data)->render();
return $view;
} }
return $output; return $output;