routenya

mail@pastecode.io avatar
unknown
php
3 years ago
2.4 kB
1
Indexable
Never
<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| 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');
});

Auth::routes();

Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
//Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::put('/home/{id}', [App\Http\Controllers\HomeController::class, 'update'])->name('home.update');
//Route::resource('home', HomeController::class);
Route::get('anggota', [App\Http\Controllers\HomeController::class, 'getAnggota'])->name('anggota.getAnggota');
//Route::get('/home/anggota', [App\Http\Controllers\HomeController::class, 'getAnggota'])->name('home.anggota');
//Route::get('/home/anggota/', [HomeController::class, 'getStudents'])->name('students.list');
Route::middleware('auth')->group(function () {
    Route::view('about', 'about')->name('about');

    Route::get('users', [\App\Http\Controllers\UserController::class, 'index'])->name('users.index');

    Route::get('profile', [\App\Http\Controllers\ProfileController::class, 'show'])->name('profile.show');
    Route::put('profile', [\App\Http\Controllers\ProfileController::class, 'update'])->name('profile.update');
    Route::get('provinces', [\App\Http\Controllers\DependentDropdownController::class, 'provinces'])->name('provinces');
    Route::get('cities', [\App\Http\Controllers\DependentDropdownController::class, 'cities'])->name('cities');
    Route::get('districts', [\App\Http\Controllers\DependentDropdownController::class, 'districts'])->name('districts');
    Route::get('villages', [\App\Http\Controllers\DependentDropdownController::class, 'citivillageses'])->name('villages');
//Route::get('provinces', 'DependentDropdownController@provinces')->name('provinces');
//Route::get('cities', 'DependentDropdownController@cities')->name('cities');
//Route::get('districts', 'DependentDropdownController@districts')->name('districts');
//Route::get('villages', 'DependentDropdownController@villages')->name('villages');
});