menambahkan folder routes
This commit is contained in:
parent
7c34162bd6
commit
90a27b278d
19
routes/api.php
Normal file
19
routes/api.php
Normal file
|
@ -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 within a group which
|
||||||
|
| is assigned the "api" middleware group. Enjoy building your API!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
||||||
|
return $request->user();
|
||||||
|
});
|
18
routes/channels.php
Normal file
18
routes/channels.php
Normal file
|
@ -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;
|
||||||
|
});
|
19
routes/console.php
Normal file
19
routes/console.php
Normal file
|
@ -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');
|
82
routes/web.php
Normal file
82
routes/web.php
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use App\Models\Barang;
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| 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 () {
|
||||||
|
|
||||||
|
$data['barang'] = Barang::join('tbl_satuan','tbl_satuan.id','=','tbl_barang.satuan_id')
|
||||||
|
->join('tbl_jenis_barang','tbl_jenis_barang.id','=','tbl_barang.jenis_barang_id')
|
||||||
|
->get(['tbl_barang.*','tbl_satuan.nama_satuan','tbl_jenis_barang.nama_jenis']);
|
||||||
|
return view('welcome',$data);
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::post('api/detail_barang', 'App\Http\Controllers\API\BarangController@detail_barang');
|
||||||
|
Route::post('api/v1/register', [App\Http\Controllers\API\AuthController::class, 'register']);
|
||||||
|
Route::post('api/login', [App\Http\Controllers\API\AuthController::class, 'login']);
|
||||||
|
|
||||||
|
|
||||||
|
Route::resource('api/barang', App\Http\Controllers\API\BarangController::class);
|
||||||
|
|
||||||
|
|
||||||
|
Route::resource('api/pengguna', App\Http\Controllers\API\PenggunaController::class);
|
||||||
|
Route::get('show_jenis_barang','App\Http\Controllers\RestController@show_jenis_barang')->name('rest.tampil');
|
||||||
|
Auth::routes();
|
||||||
|
|
||||||
|
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
||||||
|
Auth::routes();
|
||||||
|
|
||||||
|
Route::get('/home', 'App\Http\Controllers\HomeController@index')->name('home');
|
||||||
|
|
||||||
|
Route::group(['middleware' => 'auth'], function () {
|
||||||
|
Route::resource('user', 'App\Http\Controllers\UserController', ['except' => ['show']]);
|
||||||
|
Route::get('profile', ['as' => 'profile.edit', 'uses' => 'App\Http\Controllers\ProfileController@edit']);
|
||||||
|
Route::resource('pengguna','App\Http\Controllers\PenggunaController');
|
||||||
|
Route::put('update/pengguna','App\Http\Controllers\PenggunaController@update_ajax')->name('pengguna.updates');
|
||||||
|
Route::get('pengguna/hapus/{id}','App\Http\Controllers\PenggunaController@hapus')->name('pengguna.hapus');
|
||||||
|
Route::resource('divisi','App\Http\Controllers\DivisiController');
|
||||||
|
Route::put('update/divisi','App\Http\Controllers\DivisiController@update_ajax')->name('divisi.updates');
|
||||||
|
Route::get('divisi/hapus/{id}','App\Http\Controllers\DivisiController@hapus')->name('divisi.hapus');
|
||||||
|
Route::resource('transaksi','App\Http\Controllers\TransaksiController');
|
||||||
|
Route::resource('barang','App\Http\Controllers\BarangController');
|
||||||
|
Route::put('updates/barang','App\Http\Controllers\BarangController@updates_barang')->name('barang.updated');
|
||||||
|
Route::put('update/barang','App\Http\Controllers\BarangController@update_ajax')->name('barang.updates');
|
||||||
|
Route::post('barang/out','App\Http\Controllers\BarangController@barang_keluar')->name('barang.out');
|
||||||
|
Route::get('barang/hapus/{id}','App\Http\Controllers\BarangController@hapus')->name('barang.hapus');
|
||||||
|
Route::resource('satuan','App\Http\Controllers\SatuanController');
|
||||||
|
Route::put('update/satuan','App\Http\Controllers\SatuanController@update_ajax')->name('satuan.updates');
|
||||||
|
Route::get('satuan/hapus/{id}','App\Http\Controllers\SatuanController@hapus')->name('satuan.hapus');
|
||||||
|
Route::resource('jenis_barang','App\Http\Controllers\JenisBarangController');
|
||||||
|
Route::put('update/jenis_barang','App\Http\Controllers\JenisBarangController@update_ajax')->name('jenis_barang.updates');
|
||||||
|
Route::get('jenis_barang/hapus/{id}','App\Http\Controllers\JenisBarangController@hapus')->name('jenis_barang.hapus');
|
||||||
|
Route::put('profile', ['as' => 'profile.update', 'uses' => 'App\Http\Controllers\ProfileController@update']);
|
||||||
|
Route::get('upgrade', function () {return view('pages.upgrade');})->name('upgrade');
|
||||||
|
Route::get('map', function () {return view('pages.maps');})->name('map');
|
||||||
|
Route::get('icons', function () {return view('pages.icons');})->name('icons');
|
||||||
|
Route::get('table-list', function () {return view('pages.tables');})->name('table');
|
||||||
|
Route::put('profile/password', ['as' => 'profile.password', 'uses' => 'App\Http\Controllers\ProfileController@password']);
|
||||||
|
|
||||||
|
// ajax route request
|
||||||
|
|
||||||
|
// GET
|
||||||
|
Route::get('get_html_barang_rusak','App\Http\Controllers\RestController@get_html_barang_rusak');
|
||||||
|
|
||||||
|
//POST
|
||||||
|
Route::post('get_jenis_barang','App\Http\Controllers\RestController@get_jenis_barang');
|
||||||
|
Route::post('get_divisi','App\Http\Controllers\RestController@get_divisi');
|
||||||
|
Route::post('get_pengguna','App\Http\Controllers\RestController@get_pengguna');
|
||||||
|
Route::post('get_satuan_barang','App\Http\Controllers\RestController@get_satuan');
|
||||||
|
Route::post('get_barang','App\Http\Controllers\RestController@get_barang');
|
||||||
|
Route::post('get_detail_stok','App\Http\Controllers\RestController@get_detail_stok');
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user