23.11 Upload to live
This commit is contained in:
parent
8cae2f92a4
commit
8ebdacec98
80 changed files with 7320 additions and 3937 deletions
136
routes/web.php
136
routes/web.php
|
|
@ -16,45 +16,63 @@ Route::get('storage/images/{from}/{slug}', function($from = null, $slug = null)
|
|||
if ($from == 'shop'){
|
||||
$image = \App\Models\UserShop::where('filename', $slug)->first();
|
||||
$path = storage_path('app/public').'/images/shop'.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
})->name('storage_images');
|
||||
|
||||
Route::get('/product/image/{slug}', function($slug = null)
|
||||
{
|
||||
$image = \App\Models\ProductImage::where('slug', $slug)->first();
|
||||
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
if($image = \App\Models\ProductImage::where('slug', $slug)->first()){
|
||||
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
}
|
||||
|
||||
})->name('product_image');
|
||||
|
||||
|
||||
Route::get('/iq/image/{slug}', function($slug = null)
|
||||
{
|
||||
if($image = \App\Models\IqImage::where('slug', $slug)->first()){
|
||||
$path = storage_path('app/public').'/images/iq_images/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
}
|
||||
|
||||
})->name('iq_image');
|
||||
|
||||
Route::get('/user_shop/image/{slug}', function($slug = null)
|
||||
{
|
||||
$image = \App\Models\UserShopOnSite::where('slug', $slug)->first();
|
||||
$path = storage_path('app/public').'/images/user_shop'.'/'.$image->user_shop_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
if($image = \App\Models\UserShopOnSite::where('slug', $slug)->first()){
|
||||
$path = storage_path('app/public').'/images/user_shop'.'/'.$image->user_shop_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
}
|
||||
|
||||
})->name('user_shop_image');
|
||||
|
||||
Route::get('/shop/product/image/{slug}', function($slug = null)
|
||||
{
|
||||
$image = \App\Models\ProductImage::where('slug', $slug)->first();
|
||||
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
if($image = \App\Models\ProductImage::where('slug', $slug)->first()){
|
||||
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
}
|
||||
|
||||
})->name('shop_product_image');
|
||||
|
||||
|
||||
|
||||
|
||||
//main site mivita
|
||||
Route::domain(config('app.pre_url_main').config('app.domain'))->group(function () {
|
||||
Route::domain(config('app.pre_url_main').config('app.domain').config('app.tld_care'))->group(function () {
|
||||
|
||||
Route::get('/datenschutz', 'HomeController@legalDataProtected')->name('datenschutz');
|
||||
Route::get('/impressum', 'HomeController@legalImprint')->name('impressum');
|
||||
|
|
@ -81,7 +99,7 @@ Route::domain(config('app.pre_url_main').config('app.domain'))->group(function (
|
|||
|
||||
|
||||
/* ROUTING FOR CRM my.mivita / CMS*/
|
||||
Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function () {
|
||||
Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_care'))->group(function () {
|
||||
|
||||
Auth::routes();
|
||||
Route::get('/logout', function(){
|
||||
|
|
@ -198,18 +216,35 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
|
|||
Route::get('/admin/translation/file/{file}/{language?}/{langsource?}/{show?}', 'TranslationFileController@edit')->name('admin_translate_file_edit');
|
||||
Route::post('/admin/translation/file/{file}/{language?}/{langsource?}/{show?}', 'TranslationFileController@update')->name('admin_translate_file_update');
|
||||
|
||||
//site
|
||||
Route::get('/admin/sites/{site}', 'SitesController@show')->name('admin_sites');
|
||||
Route::post('/admin/sites/store/{site}', 'SitesController@store')->name('admin_sites_store');
|
||||
Route::post('/admin/sites/image/upload/{site}', 'SitesController@imageUpload')->name('admin_sites_image_upload');
|
||||
Route::get('/admin/sites/image/delete/{site}/{image_id}', 'SitesController@imageDelete')->name('admin_sites_image_delete');
|
||||
Route::get('/admin/sites/image/attribute/{site}/{image_id}/{attr}/{val}', 'SitesController@imageAttribute')->name('admin_sites_image_attribute');
|
||||
|
||||
|
||||
//products
|
||||
Route::get('/admin/product/show', 'ProductController@index')->name('admin_product_show');
|
||||
Route::post('/admin/product/store', 'ProductController@store')->name('admin_product_store');
|
||||
Route::get('/admin/product/edit/{id}', 'ProductController@edit')->name('admin_product_edit');
|
||||
Route::get('/admin/product/delete/{id}', 'ProductController@delete')->name('admin_product_delete');
|
||||
//products images
|
||||
Route::post('/admin/product/upload/image', 'ProductController@uploadImage')->name('admin_product_upload_image');
|
||||
Route::get('/admin/product/upload/delete/{image_id}/{product_id}', 'ProductController@deleteImage')->name('admin_product_delete_image');
|
||||
Route::post('/admin/product/image/upload', 'ProductController@imageUpload')->name('admin_product_image_upload');
|
||||
Route::get('/admin/product/image/delete/{image_id}/{product_id}', 'ProductController@imageDelete')->name('admin_product_image_delete');
|
||||
Route::get('/admin/product/image/attribute/{image_id}/{attr}/{val}', 'ProductController@imageAttribute')->name('admin_product_image_attribute');
|
||||
|
||||
//products categories
|
||||
Route::get('/admin/product/categories', 'CategoryController@index')->name('admin_product_categories');
|
||||
Route::get('/admin/product/category/edit/{id}', 'CategoryController@edit')->name('admin_product_category_edit');
|
||||
Route::post('/admin/product/category/store', 'CategoryController@store')->name('admin_product_category_store');
|
||||
Route::get('/admin/product/category/delete/{id}', 'CategoryController@delete')->name('admin_product_category_delete');
|
||||
//products images
|
||||
Route::post('/admin/product/category/image/upload', 'CategoryController@imageUpload')->name('admin_product_category_image_upload');
|
||||
Route::get('/admin/product/category/image/delete{image_id}/{category_id}', 'CategoryController@imageDelete')->name('admin_product_category_image_delete');
|
||||
Route::get('/admin/product/category/image/attribute/{image_id}/{attr}/{val}', 'CategoryController@imageAttribute')->name('admin_product_category_image_attribute');
|
||||
|
||||
|
||||
//products attributes
|
||||
Route::get('/admin/product/attributes', 'AttributeController@index')->name('admin_product_attributes');
|
||||
Route::post('/admin/product/attribute/store', 'AttributeController@store')->name('admin_product_attribute_store');
|
||||
|
|
@ -254,11 +289,22 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
|
|||
|
||||
});
|
||||
|
||||
|
||||
//login pages for sysadmin
|
||||
Route::group(['middleware' => ['sysadmin']], function() {
|
||||
Route::get('/sysadmin/tools/domainssl', 'SyS\AdminToolsController@domainSSL')->name('sysadmin_tools_domainssl');
|
||||
Route::post('/sysadmin/tools/domainssl', 'SyS\AdminToolsController@domainSSLStore')->name('sysadmin_tools_domainssl');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* ROUTING the checkout.mivita ... */
|
||||
|
||||
Route::domain(config('app.checkout_url').config('app.domain'))->group(function () {
|
||||
Route::domain(config('app.checkout_url').config('app.domain').config('app.tld_care'))->group(function () {
|
||||
|
||||
Route::group(['middleware' => ['checkout']], function() {
|
||||
|
||||
|
|
@ -280,34 +326,32 @@ Route::domain(config('app.checkout_url').config('app.domain'))->group(function (
|
|||
});
|
||||
});
|
||||
|
||||
/* ROUTING the SUBDOMAINS user.mivita ... */
|
||||
|
||||
Route::domain('{subdomain}.'.config('app.domain'))->group(function () {
|
||||
|
||||
Route::group(['middleware' => ['subdomain']], function() {
|
||||
|
||||
Route::get('/datenschutz', 'HomeController@legalDataProtected')->name('datenschutz');
|
||||
Route::get('/impressum', 'HomeController@legalImprint')->name('impressum');
|
||||
Route::get('/datenschutz', 'HomeController@legalDataProtected')->name('data_protected');
|
||||
Route::get('/impressum', 'HomeController@legalImprint')->name('imprint');
|
||||
Route::get('/agb', 'HomeController@legalAGB')->name('agb');
|
||||
|
||||
|
||||
|
||||
Route::get('/kontakt', 'Web\ContactController@create')->name('contact_create');
|
||||
$subDomainRouting = function (){
|
||||
Route::group(['middleware' => ['subdomain']], function() {
|
||||
Route::get('/datenschutz', 'HomeController@legalDataProtected')->name('datenschutz');
|
||||
Route::get('/impressum', 'HomeController@legalImprint')->name('impressum');
|
||||
Route::get('/datenschutz', 'HomeController@legalDataProtected')->name('data_protected');
|
||||
Route::get('/impressum', 'HomeController@legalImprint')->name('imprint');
|
||||
Route::get('/agb', 'HomeController@legalAGB')->name('agb');
|
||||
Route::get('/kontakt', 'Web\ContactController@create')->name('contact_create');
|
||||
Route::post('/kontakt', 'Web\ContactController@store')->name('contact_store');
|
||||
Route::get('/', 'Web\SiteController@index')->name('');
|
||||
Route::get('/card/add/{id}/{quantity?}/{product_slug?}', 'Web\CardController@addToCardGet')->name('user.card_add_get');
|
||||
Route::post('/card/add/{id}', 'Web\CardController@addToCardPost')->name('user.card_add_post');
|
||||
Route::get('/card/show', 'Web\CardController@showCard')->name('user.card_show');
|
||||
Route::get('/card/checkout/server', 'Web\CardController@checkoutServer')->name('user.card_checkout_server');
|
||||
Route::post('/card/update', 'Web\CardController@updateCard')->name('user.card_update');
|
||||
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove');
|
||||
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete');
|
||||
Route::get('/back/to/shop/{reference?}', 'Web\CardController@backToShop')->name('user.back_to_shop');
|
||||
Route::get('/user/card/add/{id}/{quantity?}/{product_slug?}', 'Web\CardController@addToCardGet')->name('user.card_add_get');
|
||||
Route::post('/user/card/add/{id}', 'Web\CardController@addToCardPost')->name('user.card_add_post');
|
||||
Route::get('/user/card/show', 'Web\CardController@showCard')->name('user.card_show');
|
||||
Route::get('/user/card/checkout/server', 'Web\CardController@checkoutServer')->name('user.card_checkout_server');
|
||||
Route::post('/user/card/update', 'Web\CardController@updateCard')->name('user.card_update');
|
||||
Route::get('/user/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove');
|
||||
Route::get('/user/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete');
|
||||
Route::get('/user/back/to/shop/{reference?}', 'Web\CardController@backToShop')->name('user.back_to_shop');
|
||||
|
||||
Route::get('/domain/check', 'Web\SiteController@domainCheck')->name('user.domain_check');
|
||||
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('user.site');
|
||||
});
|
||||
};
|
||||
/* ROUTING the SUBDOMAINS user.mivita.care ... */
|
||||
Route::domain('{subdomain}.'.config('app.domain').config('app.tld_care'))->group($subDomainRouting);
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
/* ROUTING the mivita.shop ... */
|
||||
Route::domain(config('app.domain').config('app.tld_shop'))->group($subDomainRouting);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue