You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.1 KiB
PHTML

<?php
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
3 years ago
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\UserController;
3 years ago
use App\Http\Controllers\ProductController;
use App\Http\Controllers\EmployeeController;
/*
|--------------------------------------------------------------------------
| 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 () {
3 years ago
return redirect()->route('login');
});
3 years ago
Route::middleware(['auth'])->group(function () {
3 years ago
Route::get('/dashboard', DashboardController::class)->name('dashboard');
Route::get('/users', [UserController::class, 'index'])->name('users.index');
Route::post('/users', [UserController::class, 'store'])->name('users.store');
Route::put('/users/{user}', [UserController::class, 'update'])->name('users.update');
Route::delete('/users/{user}', [UserController::class, 'destroy'])->name('users.destroy');
3 years ago
Route::get('/products', [ProductController::class, 'index'])->name('products.index');
Route::post('/products', [ProductController::class, 'store'])->name('products.store');
Route::post('/products/{product}', [ProductController::class, 'update'])->name('products.update');
Route::delete('/products/{product}', [ProductController::class, 'destroy'])->name('products.destroy');
Route::get('/employees', [EmployeeController::class, 'index'])->name('employees.index');
Route::post('/employees', [EmployeeController::class, 'store'])->name('employees.store');
Route::post('/employees/{employee}', [EmployeeController::class, 'update'])->name('employees.update');
Route::delete('/employees/{employee}', [EmployeeController::class, 'destroy'])->name('employees.destroy');
3 years ago
Route::get('/payrolls', fn () => inertia('Payrolls'))->name('payrolls.index');
Route::get('/report', fn () => inertia('Report'))->name('report');
3 years ago
});
require __DIR__.'/auth.php';