initial commit

This commit is contained in:
2025-11-11 14:55:29 +07:00
commit 7c17aa7843
2490 changed files with 606138 additions and 0 deletions

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,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;
});

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');

View File

@@ -0,0 +1,27 @@
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HomeController;
Route::get('change-lang/{locale}', function ($locale) {
Session::put('locale', $locale);
return Redirect::back();
});
Route::get('', [HomeController::class, 'index'])->name('home');
Route::get('privacy-policy', [HomeController::class, 'privacyPolicy'])->name('privacyPolicy');
Route::get('about', [HomeController::class, 'about'])->name('about');
Route::get('contact', [HomeController::class, 'contact'])->name('contact');
Route::post('update-article-count', [HomeController::class, 'updateArticleCount'])->name('updateArticleCount');
Route::get('category/chiangmai', [HomeController::class, 'category'])->name('category');
Route::get('category/chiangmai/article/{subCateId}', [HomeController::class, 'article'])->name('article');
Route::get('category/chiangmai/article-detail/{id}', [HomeController::class, 'articleDetail'])->name('articleDetail');
Route::get('category/where-else', [HomeController::class, 'categoryWhereElse'])->name('categoryWhereElse');
Route::get('category/where-else/article/{subCateId}/{fromDate?}/{toDate?}', [HomeController::class, 'articleWhereElse'])->name('articleWhereElse');
Route::get('category/where-else/article-detail/{id}', [HomeController::class, 'articleDetailWhereElse'])->name('articleDetailWhereElse');
Route::get('article', [HomeController::class, 'articleAll'])->name('articleAll');