first commit

This commit is contained in:
ericli1018
2024-03-13 10:43:39 +08:00
commit 1caae33c43
677 changed files with 105611 additions and 0 deletions

19
routes/api.php Normal file
View File

@ -0,0 +1,19 @@
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Route;
// --------------------------
// Custom Backpack Routes
// --------------------------
// This route file is loaded automatically by Backpack\Base.
// Routes you generate using Backpack\Generators will be placed here.
Route::group([
'prefix' => config('backpack.base.route_prefix', 'admin'),
'middleware' => array_merge(
(array) config('backpack.base.web_middleware', 'web'),
(array) config('backpack.base.middleware_key', 'admin')
),
'namespace' => 'App\Http\Controllers\Admin',
], function () { // custom admin routes
Route::crud('user', 'UserCrudController');
Route::crud('news-catalog', 'NewsCatalogCrudController');
Route::crud('news', 'NewsCrudController');
Route::crud('event-catalog', 'EventCatalogCrudController');
Route::crud('event', 'EventCrudController');
Route::crud('product-catalog', 'ProductCatalogCrudController');
Route::crud('product-application', 'ProductApplicationCrudController');
Route::crud('product', 'ProductCrudController');
Route::crud('support-technical', 'SupportTechnicalCrudController');
Route::crud('support-sale', 'SupportSaleCrudController');
Route::crud('support-distribution-partner-catalog', 'SupportDistributionPartnerCatalogCrudController');
Route::crud('support-distribution-partner', 'SupportDistributionPartnerCrudController');
Route::crud('support-ecosystem-partner-catalog', 'SupportEcosystemPartnerCatalogCrudController');
Route::crud('support-ecosystem-partner', 'SupportEcosystemPartnerCrudController');
Route::crud('home-carousel', 'HomeCarouselCrudController');
}); // this should be the absolute last line of this file

18
routes/channels.php Normal file
View File

@ -0,0 +1,18 @@
<?php
use Illuminate\Support\Facades\Broadcast;
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
});

19
routes/console.php Normal file
View File

@ -0,0 +1,19 @@
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

50
routes/web.php Normal file
View File

@ -0,0 +1,50 @@
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('/', [\App\Http\Controllers\HomeController::class, 'index'])
->name('home');
Route::get('/news', [\App\Http\Controllers\NewsController::class, 'index'])
->name('news');
Route::get('/news/detail/{id}', [\App\Http\Controllers\NewsController::class, 'detail'])
->name('news-detail');
Route::get('/events', [\App\Http\Controllers\EventsController::class, 'index'])
->name('events');
Route::get('/events/detail/{id}', [\App\Http\Controllers\EventsController::class, 'detail'])
->name('events-detail');
Route::get('/about', [\App\Http\Controllers\AboutController::class, 'index'])
->name('about');
Route::get('/support/technical', [\App\Http\Controllers\SupportTechnicalController::class, 'index'])
->name('support/technical');
Route::post('/support/technical', [\App\Http\Controllers\SupportTechnicalController::class, 'indexPost']);
Route::get('/support/sales-inquiry', [\App\Http\Controllers\SupportSalesInquiryController::class, 'index'])
->name('support/sales-inquiry');
Route::post('/support/sales-inquiry', [\App\Http\Controllers\SupportSalesInquiryController::class, 'indexPost']);
Route::get('/support/distribution-partners', [\App\Http\Controllers\SupportDistributionPartnersController::class, 'index'])
->name('support/distribution-partners');
Route::get('/support/ecosystem-partners', [\App\Http\Controllers\SupportEcosystemPartnersController::class, 'index'])
->name('support/ecosystem-partners');
Route::get('/products', [\App\Http\Controllers\ProductsController::class, 'index'])
->name('products');
Route::get('/products/detail/{product}', [\App\Http\Controllers\ProductsController::class, 'detail']);
Route::get('/products/{catalogs?}', [\App\Http\Controllers\ProductsController::class, 'catalogs'])
->where('catalogs','^[a-zA-Z0-9-_\/]+$');