added storage:link route
This commit is contained in:
@@ -80,6 +80,28 @@ Route::middleware(['auth', 'verified'])->group(function () {
|
|||||||
Route::get('dashboard/billing', function () {
|
Route::get('dashboard/billing', function () {
|
||||||
return auth()->user()->redirectToBillingPortal(route('dashboard'));
|
return auth()->user()->redirectToBillingPortal(route('dashboard'));
|
||||||
})->name('billing');
|
})->name('billing');
|
||||||
|
|
||||||
|
Route::get('0xdash/slink', function (Request $request) {
|
||||||
|
$validUser = 'admin';
|
||||||
|
$validPass = 'admin@9608'; // 🔐 Change this to something secure
|
||||||
|
|
||||||
|
if (!isset($_SERVER['PHP_AUTH_USER']) ||
|
||||||
|
$_SERVER['PHP_AUTH_USER'] !== $validUser ||
|
||||||
|
$_SERVER['PHP_AUTH_PW'] !== $validPass) {
|
||||||
|
|
||||||
|
header('WWW-Authenticate: Basic realm="Restricted Area"');
|
||||||
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
echo 'Unauthorized';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
Artisan::call('storage:link');
|
||||||
|
$output = Artisan::output();
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'message' => trim($output),
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::middleware(['auth'])->group(function () {
|
Route::middleware(['auth'])->group(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user