rename models and associates, isolate botanic with shop

This commit is contained in:
Ludovic CANDELLIER
2020-04-21 00:09:32 +02:00
parent c80b0f1edf
commit 4ad1f18310
234 changed files with 13899 additions and 3230 deletions

View File

@@ -1,6 +0,0 @@
<?php
include( __DIR__ . '/Families.php');
include( __DIR__ . '/Genres.php');
include( __DIR__ . '/Species.php');
include( __DIR__ . '/Varieties.php');

View File

@@ -0,0 +1,8 @@
<?php
Route::middleware('auth')->prefix('Admin')->namespace('Admin')->name('Admin.')->group(function () {
include( __DIR__ . '/Families.php');
include( __DIR__ . '/Genres.php');
include( __DIR__ . '/Species.php');
include( __DIR__ . '/Varieties.php');
});

6
routes/Botanic/route.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
Route::prefix('Botanic')->namespace('Botanic')->name('Botanic.')->group(function () {
include( __DIR__ . '/Admin/route.php');
});

View File

@@ -0,0 +1,4 @@
<?php
Route::resource('ArticleAttributes', 'ArticleAttributeController');

View File

@@ -0,0 +1,4 @@
<?php
Route::resource('ArticlePrices', 'ArticlePriceController');

View File

@@ -0,0 +1,12 @@
<?php
Route::prefix('Articles')->name('Articles.')->group(function () {
Route::get('', 'ArticleController@index')->name('index');
Route::get('create', 'ArticleController@create')->name('create');
Route::delete('destroy', 'ArticleController@destroy')->name('destroy');
Route::post('update', 'ArticleController@update')->name('update');
Route::post('store', 'ArticleController@store')->name('store');
Route::get('edit/{id}', 'ArticleController@edit')->name('edit');
});

View File

@@ -0,0 +1,12 @@
<?php
Route::prefix('Categories')->name('Categories.')->group(function () {
Route::get('', 'CategoryController@index')->name('index');
Route::get('create', 'CategoryController@create')->name('create');
Route::delete('destroy', 'CategoryController@destroy')->name('destroy');
Route::post('update', 'CategoryController@update')->name('update');
Route::post('store', 'CategoryController@store')->name('store');
Route::get('edit/{id}', 'CategoryController@edit')->name('edit');
});

View File

@@ -1,4 +0,0 @@
<?php
Route::resource('ProductAttributes', 'ProductAttributeController');

View File

@@ -1,4 +0,0 @@
<?php
Route::resource('ProductPrices', 'ProductPriceController');

View File

@@ -1,12 +0,0 @@
<?php
Route::prefix('Products')->name('Products.')->group(function () {
Route::get('', 'ProductController@index')->name('index');
Route::get('create', 'ProductController@create')->name('create');
Route::delete('destroy', 'ProductController@destroy')->name('destroy');
Route::post('update', 'ProductController@update')->name('update');
Route::post('store', 'ProductController@store')->name('store');
Route::get('edit/{id}', 'ProductController@edit')->name('edit');
});

View File

@@ -1,12 +0,0 @@
<?php
Route::prefix('Sections')->name('Sections.')->group(function () {
Route::get('', 'SectionController@index')->name('index');
Route::get('create', 'SectionController@create')->name('create');
Route::delete('destroy', 'SectionController@destroy')->name('destroy');
Route::post('update', 'SectionController@update')->name('update');
Route::post('store', 'SectionController@store')->name('store');
Route::get('edit/{id}', 'SectionController@edit')->name('edit');
});

View File

@@ -2,6 +2,10 @@
Route::middleware('auth')->prefix('Admin')->namespace('Admin')->name('Admin.')->group(function () {
Route::get('dashboard', 'DashboardController@index')->name('dashboard');
include( __DIR__ . '/ArticleAttributes.php');
include( __DIR__ . '/ArticlePrices.php');
include( __DIR__ . '/Articles.php');
include( __DIR__ . '/Categories.php');
include( __DIR__ . '/Customers.php');
include( __DIR__ . '/Inventories.php');
include( __DIR__ . '/InventoryPlaces.php');
@@ -9,11 +13,5 @@ Route::middleware('auth')->prefix('Admin')->namespace('Admin')->name('Admin.')->
include( __DIR__ . '/Invoices.php');
include( __DIR__ . '/OrderPayments.php');
include( __DIR__ . '/Orders.php');
include( __DIR__ . '/ProductAttributes.php');
include( __DIR__ . '/ProductPrices.php');
include( __DIR__ . '/Products.php');
include( __DIR__ . '/Sections.php');
include( __DIR__ . '/../../Admin/Shop/route.php');
});

8
routes/Shop/Articles.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
Route::prefix('Articles')->name('Articles.')->group(function () {
Route::get('', 'ArticleController@index')->name('index');
Route::get('bySection/{id}', 'ArticleController@bySection')->name('index');
Route::get('show/{id}', 'ArticleController@show')->name('show');
});

View File

@@ -0,0 +1,7 @@
<?php
Route::prefix('Categories')->name('Categories.')->group(function () {
Route::get('', 'CategoryController@index')->name('index');
Route::get('show/{id}', 'CategoryController@show')->name('show');
});

View File

@@ -1,8 +0,0 @@
<?php
Route::prefix('Products')->name('Products.')->group(function () {
Route::get('', 'ProductController@index')->name('index');
Route::get('bySection/{id}', 'ProductController@bySection')->name('index');
Route::get('show/{id}', 'ProductController@show')->name('show');
});

View File

@@ -1,7 +0,0 @@
<?php
Route::prefix('Sections')->name('Sections.')->group(function () {
Route::get('', 'SectionController@index')->name('index');
Route::get('show/{id}', 'SectionController@show')->name('show');
});

View File

@@ -4,8 +4,8 @@ Route::prefix('Shop')->namespace('Shop')->name('Shop.')->group(function () {
include( __DIR__ . '/Customers.php');
include( __DIR__ . '/Invoices.php');
include( __DIR__ . '/Orders.php');
include( __DIR__ . '/Products.php');
include( __DIR__ . '/Sections.php');
include( __DIR__ . '/Articles.php');
include( __DIR__ . '/Categories.php');
include( __DIR__ . '/Admin/route.php');
});

View File

@@ -19,6 +19,8 @@ Route::get('home', 'Shop\HomeController@index')->name('home');
// include( __DIR__ . '/boilerplate/route.php');
include( __DIR__ . '/Admin/route.php');
include( __DIR__ . '/Shop/route.php');
include( __DIR__ . '/Botanic/route.php');
Route::get('cache', 'JS\CacheController@getCacheVersions')->name('cacheVersions');