diff --git a/app/DataTables/Botanic/VarietiesDataTable.php b/app/DataTables/Botanic/VarietiesDataTable.php index df19157d..e9fc3e35 100644 --- a/app/DataTables/Botanic/VarietiesDataTable.php +++ b/app/DataTables/Botanic/VarietiesDataTable.php @@ -13,16 +13,16 @@ class VarietiesDataTable extends DataTable public function query(Variety $model) { // $model = $model::with('specie')->withCount('Articles')->select('botanic_varieties.*'); - $model = $model::joinRelations('Specie')->select('botanic_varieties.*','botanic_species.name as specie_name')->withCount('Articles'); + $model = $model::joinRelations('Specie')->select('botanic_varieties.*','botanic_species.name as specie_name')->with('Specie')->withCount('Articles'); return self::buildQuery($model); } protected function getColumns() { return [ - Column::make('specie_name')->title('Espèce'), + Column::make('Specie.name')->data('specie_name')->title('Espèce'), Column::make('name')->title('Nom'), - Column::make('articles_count')->title('Nb articles')->class('text-right'), + Column::make('articles_count')->title('Nb articles')->class('text-right')->searchable(false), self::makeColumnButtons(), ]; } diff --git a/app/DataTables/Shop/PriceGenericsDataTable.php b/app/DataTables/Shop/PriceGenericsDataTable.php index 57f19d63..51d190ce 100644 --- a/app/DataTables/Shop/PriceGenericsDataTable.php +++ b/app/DataTables/Shop/PriceGenericsDataTable.php @@ -23,7 +23,7 @@ class PriceGenericsDataTable extends DataTable Column::make('name')->title('Nom'), Column::make('price_by_unit.price')->title('Prix HT')->class('text-right'), Column::make('price_by_unit.price_taxed')->title('Prix TTC')->class('text-right'), - Column::make('prices_count')->title('Nb articles')->class('text-right'), + Column::make('prices_count')->title('Nb tarifs')->class('text-right'), self::makeColumnButtons(), ]; } diff --git a/app/Http/Controllers/Shop/Admin/PackageController.php b/app/Http/Controllers/Shop/Admin/PackageController.php new file mode 100644 index 00000000..574be29b --- /dev/null +++ b/app/Http/Controllers/Shop/Admin/PackageController.php @@ -0,0 +1,64 @@ +render('Shop.Admin.Packages.list', $data); + } + + public function getDatatable(Request $request) + { + return Packages::getTables($request->all()); + } + + public function getOptionsByFamily(Request $request) + { + $id = $request->input('family_id'); + return response()->json(Packages::getSelectByFamily($id)); + } + + public function create() + { + return view('Shop.Admin.Packages.create'); + } + + public function store(Request $request) + { + $ret = Packages::store($request->all()); + return redirect()->route('Shop.Admin.Packages.index'); + } + + public function show($id) + { + $data = Packages::get($id); + return view('Shop.Admin.Packages.view', $data); + } + + public function edit($id) + { + $data = Packages::get($id); + return view('Shop.Admin.Packages.edit', $data); + } + + public function update(Request $request) + { + // + } + + public function destroy($id) + { + return Packages::destroy($id); + } + +} diff --git a/app/Http/Controllers/Shop/Admin/PriceGenericController.php b/app/Http/Controllers/Shop/Admin/PriceGenericController.php index a4252822..87fe1d8e 100644 --- a/app/Http/Controllers/Shop/Admin/PriceGenericController.php +++ b/app/Http/Controllers/Shop/Admin/PriceGenericController.php @@ -9,6 +9,7 @@ use App\Models\Shop\PriceGeneric; use App\Repositories\Shop\PriceGenerics; use App\Repositories\Shop\PriceGenericCategories; use App\Repositories\Shop\Taxes; +use App\Repositories\Shop\Packages; use App\Repositories\Shop\Unities; use App\DataTables\Shop\PriceGenericsDataTable; @@ -34,8 +35,9 @@ class PriceGenericController extends Controller public function edit($id) { - $data['generic'] = PriceGenerics::get($id)->toArray(); - $data['unities'] = Unities::getOptions(); + $data['generic'] = PriceGenerics::getFull($id)->toArray(); + $data['packages'] = Packages::getSelectByFamily($data['generic']['category']['article_family_id']); + $data['unities'] = ($data['packages']['id'] ?? false) ? Unities::getSelectByPackage($data['packages']['id']) : []; $data['taxes'] = Taxes::getOptions(); $data['categories'] = PriceGenericCategories::getOptions(); return view('Shop.Admin.PriceGenerics.edit', $data); diff --git a/app/Http/Controllers/Shop/Admin/UnityController.php b/app/Http/Controllers/Shop/Admin/UnityController.php index 6e9b733d..f76e67ef 100644 --- a/app/Http/Controllers/Shop/Admin/UnityController.php +++ b/app/Http/Controllers/Shop/Admin/UnityController.php @@ -9,7 +9,7 @@ use App\Repositories\Shop\ArticleFamilies; use App\Repositories\Shop\Unities; use App\DataTables\Shop\UnitiesDataTable; -class UnityValueController extends Controller +class UnityController extends Controller { public function index(UnitiesDataTable $dataTable) { @@ -22,10 +22,10 @@ class UnityValueController extends Controller return Unities::getTables($request->all()); } - public function getOptionsByFamily(Request $request) + public function getOptionsByPackage(Request $request) { - $id = $request->input('family_id'); - return response()->json(Unities::getSelectByFamily($id)); + $id = $request->input('package_id'); + return response()->json(Unities::getSelectByPackage($id)); } public function create() @@ -51,14 +51,13 @@ class UnityValueController extends Controller return view('Shop.Admin.Unities.edit', $data); } - public function update(Request $request) - { - // - } - public function destroy($id) { return Unities::destroy($id); } + public function update($id) { + + } + } diff --git a/app/Models/Botanic/Variety.php b/app/Models/Botanic/Variety.php index 0ac9f30c..81d13ae8 100644 --- a/app/Models/Botanic/Variety.php +++ b/app/Models/Botanic/Variety.php @@ -24,6 +24,6 @@ class Variety extends Model implements HasMedia public function Articles() { - return $this->hasMany('App\Models\Shop\Article','model_id','id'); + return $this->morphMany('App\Models\Shop\Article','product'); } } \ No newline at end of file diff --git a/app/Models/Shop/Package.php b/app/Models/Shop/Package.php new file mode 100644 index 00000000..d82c92c3 --- /dev/null +++ b/app/Models/Shop/Package.php @@ -0,0 +1,21 @@ +belongsTo('App\Models\Shop\ArticleFamily'); + } + + public function scopeByFamily($query, $id) + { + return $query->where('article_family_id', $id); + } +} diff --git a/app/Models/Shop/PriceGenericCategory.php b/app/Models/Shop/PriceGenericCategory.php index 988ebc49..afce5505 100644 --- a/app/Models/Shop/PriceGenericCategory.php +++ b/app/Models/Shop/PriceGenericCategory.php @@ -10,6 +10,11 @@ class PriceGenericCategory extends Model protected $guarded = ['id']; protected $table = 'shop_price_generic_categories'; + public function article_family() + { + return $this->belongsTo('App\Models\Shop\ArticleFamily'); + } + public function price_generics() { return $this->hasMany('App\Models\Shop\PriceGeneric','category_id'); diff --git a/app/Models/Shop/Unity.php b/app/Models/Shop/Unity.php index 3bdfc5c1..5210270f 100644 --- a/app/Models/Shop/Unity.php +++ b/app/Models/Shop/Unity.php @@ -9,13 +9,13 @@ class Unity extends Model protected $guarded = ['id']; protected $table = 'shop_unities'; - public function article_family() + public function package() { - return $this->belongsTo('App\Models\Shop\ArticleFamily'); + return $this->belongsTo('App\Models\Shop\Package'); } - public function scopeByFamily($query, $id) + public function scopeByPackage($query, $id) { - return $query->where('article_family_id'); + return $query->where('package_id', $id); } } diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php index 4102a186..59c74528 100644 --- a/app/Repositories/Shop/Articles.php +++ b/app/Repositories/Shop/Articles.php @@ -13,183 +13,184 @@ use App\Models\Shop\Article; class Articles { - public static function getDatatable() - { - $model = Article::orderBy('name'); - return Datatables::of($model)->make(true); - } + public static function getDatatable() + { + $model = Article::orderBy('name'); + return Datatables::of($model)->make(true); + } - public static function getAll() - { - return Article::orderBy('name','asc')->get(); - } + public static function getAll() + { + return Article::orderBy('name','asc')->get(); + } - public static function getFull($id) - { - $article = self::get($id); - $data = $article->toArray(); - $data['categories'] = self::getCategoriesByArticle($article); - $data['tags'] = self::getTagsByArticle($article); - $data['prices'] = self::getPricesByArticle($article); - self::getMeta($data); - return $data; - } + public static function getFull($id) + { + $article = self::get($id); + $data = $article->toArray(); + $data['categories'] = self::getCategoriesByArticle($article); + $data['tags'] = self::getTagsByArticle($article); + $data['prices'] = self::getPricesByArticle($article); + self::getMeta($data); + return $data; + } - public static function getMeta(&$data = []) - { - $data['categories_options'] = Categories::getOptions(); - $data['price_generics'] = PriceGenericCategories::getOptionsWithChildrens(); - $data['families_options'] = ArticleFamilies::getOptions(); - $data['taxes_options'] = Taxes::getOptions(); - $data['unities'] = Unities::getSelectByFamily($data['article_family_id']); - $data['tags_list'] = TagGroups::getTreeTags(); - $data['models_options'] = ['App\Models\Botanic\Specie' => 'Espèces', 'App\Models\Botanic\Variety' => 'Variétés']; - return $data; - } + public static function getMeta(&$data = []) + { + $data['categories_options'] = Categories::getOptions(); + $data['price_generics'] = PriceGenericCategories::getOptionsWithChildrens(); + $data['families_options'] = ArticleFamilies::getOptions(); + $data['taxes_options'] = Taxes::getOptions(); + $data['packages'] = Packages::getSelectByFamily($data['article_family_id']); + $data['unities'] = ($data['packages']['id'] ?? false) ? Unities::getSelectByPackage($data['packages']['id']) : []; + $data['tags_list'] = TagGroups::getTreeTags(); + $data['models_options'] = ['App\Models\Botanic\Specie' => 'Espèces', 'App\Models\Botanic\Variety' => 'Variétés']; + return $data; + } - public static function getByCategory($category_id) - { - // TODO add category - return Article::with(['prices','product','image'])->get(); - } + public static function getByCategory($category_id) + { + // TODO add category + return Article::with(['prices','product','image'])->get(); + } - public static function getCategoriesByArticle($article) - { - return $article->categories->pluck('id')->toArray(); - } + public static function getCategoriesByArticle($article) + { + return $article->categories->pluck('id')->toArray(); + } - public static function getTagsByArticle($article) - { - return $article->tags->pluck('id')->toArray(); - } + public static function getTagsByArticle($article) + { + return $article->tags->pluck('id')->toArray(); + } - public static function getPricesByArticle($article) - { - return Prices::getByArticle($article->id); - } + public static function getPricesByArticle($article) + { + return Prices::getByArticle($article->id); + } - public static function get($id) - { - return Article::find($id); - } + public static function get($id) + { + return Article::find($id); + } - public static function storeFull($data) - { - $images = isset($data['images']) ? $data['images'] : false; - $categories = isset($data['categories']) ? $data['categories'] : false; - $tags = isset($data['tags']) ? $data['tags'] : false; - $prices = isset($data['prices']) ? $data['prices'] : false; - unset($data['images']); - unset($data['categories']); - unset($data['tags']); - unset($data['prices']); - $article = self::store($data); - self::storeImages($article, $images); - self::storeCategories($article, $categories); - self::storeTags($article, $tags); - self::storePrices($article, $prices); - return $article->id; - } + public static function storeFull($data) + { + $images = isset($data['images']) ? $data['images'] : false; + $categories = isset($data['categories']) ? $data['categories'] : false; + $tags = isset($data['tags']) ? $data['tags'] : false; + $prices = isset($data['prices']) ? $data['prices'] : false; + unset($data['images']); + unset($data['categories']); + unset($data['tags']); + unset($data['prices']); + $article = self::store($data); + self::storeImages($article, $images); + self::storeCategories($article, $categories); + self::storeTags($article, $tags); + self::storePrices($article, $prices); + return $article->id; + } - public static function store($data) - { - $id = isset($data['id']) ? $data['id'] : false; - return $id ? self::update($data) : self::create($data); - } + public static function store($data) + { + $id = isset($data['id']) ? $data['id'] : false; + return $id ? self::update($data) : self::create($data); + } - public static function create($data) - { - return Article::create($data); - } + public static function create($data) + { + return Article::create($data); + } - public static function update($data, $id = false) - { - $id = $id ? $id : $data['id']; - $article = Article::find($id); - $ret = $article->update($data); - return $article; - } + public static function update($data, $id = false) + { + $id = $id ? $id : $data['id']; + $article = Article::find($id); + $ret = $article->update($data); + return $article; + } - public static function destroy($id) - { - return Article::destroy($id); - } + public static function destroy($id) + { + return Article::destroy($id); + } - public static function storeCategories($article, $categories) - { - if ($categories) { - $categories = collect($categories)->transform(function ($item, $key) { - return (int) $item; - })->toArray(); - return $article->syncCategories($categories, true); - } else { - return false; - } - } + public static function storeCategories($article, $categories) + { + if ($categories) { + $categories = collect($categories)->transform(function ($item, $key) { + return (int) $item; + })->toArray(); + return $article->syncCategories($categories, true); + } else { + return false; + } + } - public static function storeTags($article, $tags) - { - if ($tags) { - $tags = collect($tags)->transform(function ($item, $key) { - return (int) $item; - })->toArray(); - return $article->syncTags($tags, true); - } else return false; - } + public static function storeTags($article, $tags) + { + if ($tags) { + $tags = collect($tags)->transform(function ($item, $key) { + return (int) $item; + })->toArray(); + return $article->syncTags($tags, true); + } else return false; + } - public static function storePrices($article, $prices) - { - return ArticlePrices::storePrices($article->id, $prices); - } + public static function storePrices($article, $prices) + { + return ArticlePrices::storePrices($article->id, $prices); + } - public static function storeImages($article, $files) - { - if ($files) { - foreach ($files as $file) { - self::storeImage($article, $file); - } - } - } + public static function storeImages($article, $files) + { + if ($files) { + foreach ($files as $file) { + self::storeImage($article, $file); + } + } + } - public static function storeImage($article, $file) - { - return $article->addMedia($file)->withResponsiveImages()->toMediaCollection('images'); - } + public static function storeImage($article, $file) + { + return $article->addMedia($file)->withResponsiveImages()->toMediaCollection('images'); + } - public static function getImages($id) - { - $article = self::get($id); - if ($article) - { - $article->getMedia(); - foreach ($article->media as $key => $media) { - $article->media[$key]['url'] = $media->getUrl(); - } - return $article->media; - } else { - return false; - } - } + public static function getImages($id) + { + $article = self::get($id); + if ($article) + { + $article->getMedia(); + foreach ($article->media as $key => $media) { + $article->media[$key]['url'] = $media->getUrl(); + } + return $article->media; + } else { + return false; + } + } - public static function getThumbSrc($image) - { - $id = $image['id']; - $images = json_decode($image['responsive_images'], true); - $urls = $images['medialibrary_original']['urls']; + public static function getThumbSrc($image) + { + $id = $image['id']; + $images = json_decode($image['responsive_images'], true); + $urls = $images['medialibrary_original']['urls']; - $img = $urls[count($urls)-1]; - $src = "storage/$id/responsive-images/$img"; - return $src; - } + $img = $urls[count($urls)-1]; + $src = "storage/$id/responsive-images/$img"; + return $src; + } - public static function deleteImage($id, $index) - { - $article = self::get($id); - $article->getMedia(); - $ret = $article->media[$index]->delete(); - return "1"; - } + public static function deleteImage($id, $index) + { + $article = self::get($id); + $article->getMedia(); + $ret = $article->media[$index]->delete(); + return "1"; + } } diff --git a/app/Repositories/Shop/Packages.php b/app/Repositories/Shop/Packages.php new file mode 100644 index 00000000..164d579e --- /dev/null +++ b/app/Repositories/Shop/Packages.php @@ -0,0 +1,63 @@ +make(true); + } + + public static function getOptions() + { + return Package::orderBy('value','asc')->pluck('value','id')->toArray(); + } + + public static function getSelectByFamily($family_id) + { + return Package::orderBy('value','asc')->byFamily($family_id)->pluck('value','id')->toArray(); + } + + public static function getAll() + { + return Package::orderBy('value','asc')->get(); + } + + public static function get($id) + { + return Package::find($id); + } + + public static function store($data) + { + $id = isset($data['id']) ? $data['id'] : false; + $item = $id ? self::update($data) : self::create($data); + return $item->id; + } + + public static function create($data) + { + return Package::create($data); + } + + public static function update($data) + { + return Package::find($id)->update($data); + } + + public static function destroy($id) + { + return Package::destroy($id); + } + +} diff --git a/app/Repositories/Shop/PriceGenerics.php b/app/Repositories/Shop/PriceGenerics.php index 1d34cc47..95db1b3a 100644 --- a/app/Repositories/Shop/PriceGenerics.php +++ b/app/Repositories/Shop/PriceGenerics.php @@ -43,7 +43,12 @@ class PriceGenerics public static function get($id) { - return PriceGeneric::with("values")->find($id); + return PriceGeneric::find($id); + } + + public static function getFull($id) + { + return PriceGeneric::with(['category','prices'])->find($id); } public static function store($data) diff --git a/app/Repositories/Shop/Unities.php b/app/Repositories/Shop/Unities.php index 3a4dcfde..1ee76f3a 100644 --- a/app/Repositories/Shop/Unities.php +++ b/app/Repositories/Shop/Unities.php @@ -23,9 +23,9 @@ class Unities return Unity::orderBy('value','asc')->get()->pluck('value','id')->toArray(); } - public static function getSelectByFamily($family_id) + public static function getSelectByPackage($package_id) { - $values = Unity::byFamily($family_id)->get(); + $values = Unity::byPackage($package_id)->get(); $data = []; foreach ($values as $value) { diff --git a/resources/views/Shop/Admin/Articles/partials/prices/block_price.blade.php b/resources/views/Shop/Admin/Articles/partials/prices/block_price.blade.php index 1db86b6a..60625fd5 100644 --- a/resources/views/Shop/Admin/Articles/partials/prices/block_price.blade.php +++ b/resources/views/Shop/Admin/Articles/partials/prices/block_price.blade.php @@ -11,7 +11,28 @@ @include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm']) -
+
+ {{ Form::label('package_id', 'Type Package') }}
+ @include('components.select', [ + 'name' => "prices[$key][package_id]", + 'value' => $price['package_id'] ?? null, + 'list' => $packages ?? null, + 'required' => true, + 'class' => 'select2 form-control-sm packages w-100', + ]) +
+ +
+ {{ Form::label('package_qty', 'Pack Qté') }}
+ @include('components.number', [ + 'name' => "prices[$key][package_quantity]", + 'value' => $price['package_quantity'] ?? null, + 'required' => true, + 'class' => 'form-control-sm', + ]) +
+ +
{{ Form::label('unity_id', 'Unité') }}
@include('components.select', [ 'name' => "prices[$key][unity_id]", @@ -19,10 +40,11 @@ 'list' => $unities ?? null, 'required' => true, 'class' => 'select2 form-control-sm unities w-100', + 'with_empty' => '' ])
-
+
{{ Form::label('tax_id', 'TVA') }}
diff --git a/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php b/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php index a7f0d32e..63c0bcd1 100644 --- a/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php +++ b/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php @@ -12,7 +12,28 @@ @include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
-
+
+ {{ Form::label('package_id', 'Type Package') }}
+ @include('components.select', [ + 'name' => "prices[0][package_id]", + 'value' => $price['package_id'] ?? null, + 'list' => $packages ?? null, + 'required' => true, + 'class' => 'select2 form-control-sm packages w-100', + ]) +
+ +
+ {{ Form::label('package_qty', 'Pack Qté') }}
+ @include('components.number', [ + 'name' => "prices[0][package_quantity]", + 'value' => $price['package_quantity'] ?? null, + 'required' => true, + 'class' => 'form-control-sm', + ]) +
+ +
{{ Form::label('unity_id', 'Unité') }}
@include('components.select', [ 'name' => "prices[0][unity_id]", @@ -20,10 +41,11 @@ 'list' => $unities ?? null, 'required' => true, 'class' => 'select2 form-control-sm unities w-100', + 'with_empty' => '' ])
-
+
diff --git a/resources/views/Shop/Admin/PriceGenerics/form.blade.php b/resources/views/Shop/Admin/PriceGenerics/form.blade.php index 9ca52124..3a7cb939 100644 --- a/resources/views/Shop/Admin/PriceGenerics/form.blade.php +++ b/resources/views/Shop/Admin/PriceGenerics/form.blade.php @@ -12,7 +12,7 @@
-@include('Shop.Admin.PriceGenerics.partials.prices', ['prices' => $generic['values'] ?? null ]) +@include('Shop.Admin.PriceGenerics.partials.prices', ['prices' => $generic['prices'] ?? null ])
diff --git a/resources/views/Shop/Admin/PriceGenerics/partials/block_price.blade.php b/resources/views/Shop/Admin/PriceGenerics/partials/block_price.blade.php index a153e94d..2b2ab426 100644 --- a/resources/views/Shop/Admin/PriceGenerics/partials/block_price.blade.php +++ b/resources/views/Shop/Admin/PriceGenerics/partials/block_price.blade.php @@ -7,30 +7,63 @@
-
+
{{ Form::label('quantity', 'Qté.') }}
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
-
+
+ {{ Form::label('package_id', 'Type Package') }}
+ @include('components.select', [ + 'name' => "prices[$key][package_id]", + 'value' => $price['package_id'] ?? null, + 'list' => $packages ?? null, + 'required' => true, + 'class' => 'select2 form-control-sm packages w-100', + ]) +
+ +
+ {{ Form::label('package_qty', 'Pack Qté') }}
+ @include('components.number', [ + 'name' => "prices[$key][package_quantity]", + 'value' => $price['package_quantity'] ?? null, + 'required' => true, + 'class' => 'form-control-sm', + ]) +
+ +
{{ Form::label('unity_id', 'Unité') }}
- @include('components.select', ['name' => 'prices[0][unity_id]', 'value' => $unity_id ?? null, 'list' => $unities ?? null, 'required' => true, 'class' => 'form-control-sm']) + @include('components.select', [ + 'name' => "prices[$key][unity_id]", + 'value' => $price['unity_id'] ?? null, + 'list' => $unities ?? null, + 'required' => true, + 'class' => 'select2 form-control-sm unities w-100', + 'with_empty' => '' + ])
-
- {{ Form::label('tax_id', 'TVA') }}
- @include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes ?? null, 'required' => true, 'class' => 'form-control-sm']) +
+
+
+ {{ Form::label('tax_id', 'TVA') }}
+ @include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm']) +
+ +
+ {{ Form::label('price', 'Prix HT') }} + @include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) +
+ +
+ {{ Form::label('price_taxed', 'Prix TTC') }} + @include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item']) +
+
-
- {{ Form::label('price', 'Prix HT') }} - @include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) -
- -
- {{ Form::label('price_taxed', 'Prix TTC') }} - @include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item']) -

diff --git a/resources/views/Shop/layout/partials/footer.blade.php b/resources/views/Shop/layout/partials/footer.blade.php index e82d580d..4249b47e 100644 --- a/resources/views/Shop/layout/partials/footer.blade.php +++ b/resources/views/Shop/layout/partials/footer.blade.php @@ -1,6 +1,3 @@
-@include("Shop._partials.footer-after") - -
diff --git a/resources/views/layouts/site.blade.php b/resources/views/layouts/site.blade.php index 80d315e7..77fc4c1a 100644 --- a/resources/views/layouts/site.blade.php +++ b/resources/views/layouts/site.blade.php @@ -5,7 +5,7 @@ - {{ config('app.name', 'Laravel') }} + {{ config('app.name') }} @stack('css') diff --git a/resources/views/load/functions.blade.php b/resources/views/load/functions.blade.php new file mode 100644 index 00000000..5644c0ca --- /dev/null +++ b/resources/views/load/functions.blade.php @@ -0,0 +1,18 @@ +@if(!defined('LOAD_FUNCTIONS')) + @push('scripts') + + @endpush + @php(define('LOAD_FUNCTIONS', true)) +@endif \ No newline at end of file diff --git a/routes/Shop/Admin/Unities.php b/routes/Shop/Admin/Unities.php index afede1fc..39855ac8 100644 --- a/routes/Shop/Admin/Unities.php +++ b/routes/Shop/Admin/Unities.php @@ -1,7 +1,7 @@ name('Unities.')->group(function () { - Route::any('getOptionsByFamily', 'UnityController@getOptionsByFamily')->name('getOptionsByFamily'); + Route::any('getOptionsByPackage', 'UnityController@getOptionsByPackage')->name('getOptionsByPackage'); }); Route::resource('Unities', 'UnityController'); diff --git a/routes/api.php b/routes/api.php index c641ca5e..16d41d48 100644 --- a/routes/api.php +++ b/routes/api.php @@ -12,7 +12,8 @@ use Illuminate\Http\Request; | is assigned the "api" middleware group. Enjoy building your API! | */ - +/* Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); +*/ \ No newline at end of file