Advertisement
Firdaus_Shinoda

web.php

May 16th, 2017
1,928
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.24 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('/',function () {
  15.   //return view('home');
  16. });*/
  17. /*Route::get('about',function () {
  18.   return view('about');
  19. });*/
  20. /*Route::get('karyawan',function(){
  21.   $karyawan = ['Munawar','Budi Santoso', 'Widya Ningrum', 'Unggul Jaya'];
  22.   return view('pages/karyawan',compact('karyawan'));
  23. });
  24. Route::get('about','BelajarController@index');
  25.  
  26. Route::get('/','Tugas1Controller@index');
  27. Route::get('karyawan','Tugas1Controller@karyawan');
  28. Route::get('karyawan/create','KaryawanController@create');
  29. //Route::post('karyawan','KaryawanController@store');
  30.  
  31.  
  32. Route::get('/Projek1','Projek1Controller@index');*/
  33. Route::get('about','Tugas1Controller@about');
  34. Route::post('/Projek1/auth','Projek1Controller@auth');
  35. Route::get('sampeldata',function(){
  36.   DB::table('employees')->insert([
  37.     [
  38.       'nama'=>'Zaid',
  39.       'nip'=>'10001',
  40.       'tgl_lahir'=>'1990-01-22',
  41.       'gender'=>'L',
  42.       'created_at'=>'2017-04-24 21:18',
  43.       'updated_at'=>'2017-04-24 21:18'
  44.     ],
  45.     [
  46.       'nama'=>'Hindu',
  47.       'nip'=>'10002',
  48.       'tgl_lahir'=>'1988-01-22',
  49.       'gender'=>'P',
  50.       'created_at'=>'2017-04-24 21:11',
  51.       'updated_at'=>'2017-04-24 21:11'
  52.     ],
  53.     [
  54.       'nama'=>'Hasan',
  55.       'nip'=>'10003',
  56.       'tgl_lahir'=>'1991-11-26',
  57.       'gender'=>'L',
  58.       'created_at'=>'2017-04-24 21:18',
  59.       'updated_at'=>'2017-04-24 21:18'
  60.     ],
  61.   ]);
  62. });
  63. Route::get('karyawan','KaryawanController@index');
  64. Route::get('karyawan/create','KaryawanController@create');
  65. Route::post('karyawan/cari','KaryawanController@cari');
  66. Route::get('karyawan/{karyawan}','KaryawanController@show');
  67. Route::post('karyawan/','KaryawanController@store');
  68. Route::get('karyawan/{karyawan}/edit','KaryawanController@edit');
  69. Route::patch('karyawan/{karyawan}','KaryawanController@update');
  70. Route::delete('karyawan/{karyawan}','KaryawanController@destroy');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement