mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-25 20:51:30 -08:00
e01e0c5596
Add refresh licenses, accessories and consumables tables refresh when add a new element resources\assets\js\snipeit_modals.js Some design fixes resources\views\kits\edit.blade.php Add default value to form (template) resources\views\modals\kit-model.blade.php New routes for kit accessories and kit consumables routes\api.php New routes for kit models, kit accessories and kit consumables routes\web\kits.php New templates
90 lines
2.2 KiB
PHP
90 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
|
|
|
class RouteServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* This namespace is applied to your controller routes.
|
|
*
|
|
* In addition, it is set as the URL generator's root namespace.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $namespace = 'App\Http\Controllers';
|
|
|
|
/**
|
|
* Define your route model bindings, pattern filters, etc.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
|
|
parent::boot();
|
|
}
|
|
|
|
/**
|
|
* Define the routes for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function map()
|
|
{
|
|
$this->mapApiRoutes();
|
|
|
|
$this->mapWebRoutes();
|
|
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Define the "web" routes for the application.
|
|
*
|
|
* These routes all receive session state, CSRF protection, etc.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function mapWebRoutes()
|
|
{
|
|
Route::group([
|
|
'middleware' => 'web',
|
|
'namespace' => $this->namespace,
|
|
], function ($router) {
|
|
require base_path('routes/web/hardware.php');
|
|
require base_path('routes/web/models.php');
|
|
require base_path('routes/web/accessories.php');
|
|
require base_path('routes/web/licenses.php');
|
|
require base_path('routes/web/consumables.php');
|
|
require base_path('routes/web/fields.php');
|
|
require base_path('routes/web/components.php');
|
|
require base_path('routes/web/users.php');
|
|
require base_path('routes/web/kits.php');
|
|
//require base_path('routes/web/dbtest.php');
|
|
require base_path('routes/web.php');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Define the "api" routes for the application.
|
|
*
|
|
* These routes are typically stateless.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function mapApiRoutes()
|
|
{
|
|
Route::group([
|
|
'middleware' => 'auth:api',
|
|
'namespace' => $this->namespace,
|
|
'prefix' => 'api',
|
|
], function ($router) {
|
|
require base_path('routes/api.php');
|
|
});
|
|
}
|
|
}
|