Advertisement
fadlyshafa

Untitled

Feb 21st, 2020
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.18 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Web Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register web routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | contains the "web" middleware group. Now create something great!
  11. |
  12. */
  13.  
  14. Route::get('create-admin',function(){
  15.     \DB::table('users')->insert([
  16.         'role'=>1,
  17.         'name'=>'admin',
  18.         'nisn'=>'1',
  19.         'email'=>'admin@sangcahaya.com',
  20.         'id_registrasi'=>'-',
  21.         'password'=>bcrypt('123')
  22.     ]);
  23. });
  24.  
  25. Route::get('/', function () {
  26.     $title = 'Sangcahaya.com | PPDB';
  27.     return view('welcome',compact('title'));
  28. });
  29.  
  30. Route::get('keluar',function(){
  31.     \Auth::logout();
  32.     return redirect('/');
  33. });
  34.  
  35. Route::get('ppdb','Ppdb_controller@index');
  36. Route::post('ppdb','Ppdb_controller@store');
  37.  
  38. Route::group(['middleware'=>'auth'],function(){
  39.  
  40.     Route::get('dashboard','Dashboard\Beranda_controller@index');
  41.  
  42.     Route::get('biodata','Dashboard\Biodata_controller@index');
  43.     Route::post('biodata/{users}','Dashboard\Biodata_controller@store');
  44.     Route::put('biodata/{users}','Dashboard\Biodata_controller@update');
  45.  
  46.     // cetak biodata
  47.     Route::get('cetak-biodata','Dashboard\Biodata_controller@cetak');
  48.  
  49.     // verifikasi peserta
  50.     Route::get('verifikasi','Dashboard\Verifikasi_controller@index');
  51.     Route::post('verifikasi','Dashboard\Verifikasi_controller@verifikasi');
  52.  
  53.     // Data peserta
  54.     Route::get('peserta','Dashboard\Peserta_controller@index');
  55.     Route::get('peserta/verifikasi','Dashboard\Peserta_controller@diverifikasi');
  56.     Route::get('peserta/belum-verifikasi','Dashboard\Peserta_controller@belum_verifikasi');
  57.  
  58.     // profile sekolah
  59.     Route::get('profile-sekolah','Dashboard\Profile_sekolah_controller@index');
  60.     Route::put('profile-sekolah','Dashboard\Profile_sekolah_controller@update');
  61.  
  62.     // pesan
  63.     Route::get('pesan','Dashboard\Pesan_controller@index');
  64.  
  65.     Route::get('pesan/add','Dashboard\Pesan_controller@add');
  66.     Route::post('pesan/add','Dashboard\Pesan_controller@store');
  67.  
  68. });
  69.  
  70. Auth::routes();
  71.  
  72. Route::get('/home', function(){
  73.     return redirect('dashboard');
  74. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement