restaurant changes

This commit is contained in:
Sampanna Rimal
2024-09-19 18:33:08 +05:45
parent 0b438e302d
commit 2fa9d47a73
115 changed files with 3489 additions and 67 deletions

View File

View File

@ -0,0 +1,19 @@
<?php
use Illuminate\Support\Facades\Route;
use Modules\Ingredient\Http\Controllers\IngredientController;
/*
*--------------------------------------------------------------------------
* API Routes
*--------------------------------------------------------------------------
*
* Here is where you can register API routes for your application. These
* routes are loaded by the RouteServiceProvider within a group which
* is assigned the "api" middleware group. Enjoy building your API!
*
*/
Route::middleware(['auth:sanctum'])->prefix('v1')->group(function () {
Route::apiResource('ingredient', IngredientController::class)->names('ingredient');
});

View File

@ -0,0 +1,27 @@
<?php
use Illuminate\Support\Facades\Route;
use Modules\Ingredient\Http\Controllers\IngredientCategoryController;
use Modules\Ingredient\Http\Controllers\IngredientController;
use Modules\Ingredient\Http\Controllers\UnitController;
/*
|--------------------------------------------------------------------------
| 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::group([], function () {
Route::resource('ingredient', IngredientController::class)->names('ingredient');
Route::resource('ingredientCategory', IngredientCategoryController::class)->names('ingredientCategory');
Route::resource('unit', UnitController::class)->names('unit');
Route::get('ingredient-details', [IngredientController::class, 'getIngredientDetail'])->name('get-ingredient-detail');
Route::get('/ingredients-by-category', [IngredientController::class, 'getIngredientsByCategory'])->name('ingredients-by-category');
});