Laravel API hozzáadása
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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::post('login', 'Auth\LoginController@login');
|
||||
Route::post('logout', 'Auth\LoginController@logout');
|
||||
Route::post('makehash', 'Auth\LoginController@makeHASH');
|
||||
// Route::post('register', 'Auth\RegisterController@register');
|
||||
|
||||
|
||||
|
||||
Route::group(['middleware' => 'auth:api'], function () {
|
||||
|
||||
Route::group(['namespace' => 'Api'], function()
|
||||
{
|
||||
|
||||
Route::get('storage', 'StorageController@getStorage');
|
||||
|
||||
Route::post('additemstoragein', 'StorageController@addItemStorageIn');
|
||||
Route::post('additemgroupstoragein', 'StorageController@addItemGroupStorageIn');
|
||||
Route::post('removeitemstoragein', 'StorageController@removeItemStorageIn');
|
||||
Route::post('finalizestoragein', 'StorageController@finalizeStorageIn');
|
||||
|
||||
Route::post('getstorageinheader', 'StorageController@getStorageInHeader');
|
||||
Route::get('liststorageinheader/{storage}/{open}', 'StorageController@listStorageInHeader');
|
||||
|
||||
Route::post('additemstorageout', 'StorageController@addItemStorageOut');
|
||||
Route::post('additemgroupstorageout', 'StorageController@addItemGroupStorageOut');
|
||||
|
||||
Route::post('removeitemstorageout', 'StorageController@removeItemStorageOut');
|
||||
Route::post('finalizestorageout', 'StorageController@finalizeStorageOut');
|
||||
Route::post('finalizeandmovestorageout', 'StorageController@finalizeAndMoveStorageOut');
|
||||
|
||||
|
||||
Route::post('startinventory', 'StorageController@startInventory');
|
||||
Route::post('additeminventory', 'StorageController@addItemInventory');
|
||||
Route::post('removeiteminventory', 'StorageController@removeItemInventory');
|
||||
Route::post('createdifferentinventory', 'StorageController@createDifferentInventory');
|
||||
|
||||
|
||||
Route::post('makeserialnumberrangestoragein', 'StorageController@makeSerialNumberRangeStorageIn');
|
||||
Route::post('makeserialnumberrangestorageout', 'StorageController@makeSerialNumberRangeStorageOut');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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());
|
||||
})->describe('Display an inspiring quote');
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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');
|
||||
});
|
||||
Reference in New Issue
Block a user