update,
This commit is contained in:
@@ -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();
|
||||
});
|
@@ -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;
|
||||
});
|
@@ -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');
|
@@ -0,0 +1,93 @@
|
||||
<?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 within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
use App\Http\Controllers\DashboardController;
|
||||
use App\Http\Controllers\ProfileController;
|
||||
use App\Http\Controllers\RegisterController;
|
||||
use App\Http\Controllers\SessionsController;
|
||||
|
||||
|
||||
Route::get('/helloworld', function () {return redirect('sign-in');})->middleware('guest');
|
||||
Route::get('/', function () {return redirect('sign-in');})->middleware('guest');
|
||||
|
||||
Route::get('/dashboard', [DashboardController::class, 'index'])->middleware('auth')->name('dashboard');
|
||||
|
||||
Route::get('sign-up', [RegisterController::class, 'create'])->middleware('guest')->name('register');
|
||||
|
||||
Route::post('sign-up', [RegisterController::class, 'store'])->middleware('guest');
|
||||
|
||||
Route::get('sign-in', [SessionsController::class, 'create'])->middleware('guest')->name('login');
|
||||
|
||||
Route::post('sign-in', [SessionsController::class, 'store'])->middleware('guest');
|
||||
|
||||
Route::post('verify', [SessionsController::class, 'show'])->middleware('guest');
|
||||
|
||||
Route::post('reset-password', [SessionsController::class, 'update'])->middleware('guest')->name('password.update');
|
||||
|
||||
Route::get('verify', function () {
|
||||
return view('sessions.password.verify');
|
||||
})->middleware('guest')->name('verify');
|
||||
|
||||
Route::get('/reset-password/{token}', function ($token) {
|
||||
return view('sessions.password.reset', ['token' => $token]);
|
||||
})->middleware('guest')->name('password.reset');
|
||||
|
||||
Route::post('sign-out', [SessionsController::class, 'destroy'])->middleware('auth')->name('logout');
|
||||
|
||||
Route::get('profile', [ProfileController::class, 'create'])->middleware('auth')->name('profile');
|
||||
|
||||
Route::post('user-profile', [ProfileController::class, 'update'])->middleware('auth');
|
||||
|
||||
Route::group(['middleware' => 'auth'], function () {
|
||||
Route::get('billing', function () {
|
||||
return view('pages.billing');
|
||||
})->name('billing');
|
||||
|
||||
Route::get('tables', function () {
|
||||
return view('pages.tables');
|
||||
})->name('tables');
|
||||
|
||||
Route::get('rtl', function () {
|
||||
return view('pages.rtl');
|
||||
})->name('rtl');
|
||||
|
||||
Route::get('virtual-reality', function () {
|
||||
return view('pages.virtual-reality');
|
||||
})->name('virtual-reality');
|
||||
|
||||
Route::get('notifications', function () {
|
||||
return view('pages.notifications');
|
||||
})->name('notifications');
|
||||
|
||||
Route::get('static-sign-in', function () {
|
||||
return view('pages.static-sign-in');
|
||||
})->name('static-sign-in');
|
||||
|
||||
Route::get('static-sign-up', function () {
|
||||
return view('pages.static-sign-up');
|
||||
})->name('static-sign-up');
|
||||
|
||||
Route::get('user-management', function () {
|
||||
return view('pages.laravel-examples.user-management');
|
||||
})->name('user-management');
|
||||
|
||||
Route::get('user-profile', function () {
|
||||
return view('pages.laravel-examples.user-profile');
|
||||
})->name('user-profile');
|
||||
});
|
Reference in New Issue
Block a user