ugisugihartono

web.php

May 16th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 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. /*ute::get('/', function () {
  15.     return view('welcome');
  16. });*/
  17.  
  18. Route::get('nyoba',function(){
  19.     return 'Hi. Welcome to Laravel';
  20. });
  21.  
  22. /*Route::get('/', function () {
  23.     return view('home');
  24. });
  25.  
  26. Route::get('about', function () {
  27.     return view('about');
  28. });*/
  29.  
  30. //Route::get('about', 'BelajarController@index');
  31. //start
  32. Route::get('/', function () {
  33.     return view('chap5.home');
  34. });
  35.  
  36. Route::get('about', function () {
  37.     $halaman='about';
  38.     return view('chap5.about', compact('halaman'));
  39. });
  40.  
  41. Route::get('karyawan', 'KaryawanController@index');
  42. Route::get('karyawan/create', 'KaryawanController@create');
  43. Route::get('karyawan/{karyawan}', 'KaryawanController@show');  
  44. Route::post('karyawan', 'KaryawanController@store');
  45. Route::get('karyawan/{karyawan}/edit', 'KaryawanController@edit'); 
  46. Route::patch('karyawan/{karyawan}', 'KaryawanController@update');
  47. Route::delete('karyawan/{karyawan}','KaryawanController@destroy');
  48. Route::get('query', 'KaryawanController@search');
Advertisement
Add Comment
Please, Sign In to add comment