Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
491
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Application Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register all of the routes for an application.
  9. | It's a breeze. Simply tell Laravel the URIs it should respond to
  10. | and give it the Closure to execute when that URI is requested.
  11. |
  12. */
  13.  
  14.  
  15. Route::get('/','HomeController@showpage');
  16. Route::post('/','HomeController@savepage');
  17.  
  18. Route::post('/signup/add', function(){
  19.  
  20.     echo "Hello world";
  21.  
  22. });
  23.  
  24. Route::get('/admin/','AdminController@index');
  25. Route::post('/admin/','AdminController@login');
  26. Route::get("/admin/logout/","AdminController@logout");
  27.  
  28. Route::group(array('before' => 'auth'), function()
  29. {
  30.     // C(R)UD on pages...
  31.     Route::post('/admin/pages/add/', array('uses' => 'PageController@Add','as' => 'admin.addpage'));
  32.     Route::post('/admin/pages/edit/', array('uses' => 'PageController@Edit','as' => 'admin.editpage'));
  33.    
  34.     Route::post('/admin/language/edit/',array('uses' => 'LanguageController@Edit', 'as' => 'admin.editlanguage'));
  35.  
  36.     Route::get("/admin/pages/delete", array('uses' => 'PageController@Delete', 'as' => "admin.deletePage"));
  37.  
  38.     Route::post("/admin/languages/add", array("uses" => "LanguageController@Add", "as"=>"admin.addLanguage"));
  39.  
  40.     Route::get('/admin/languages', array('uses' => 'AdminController@Languages', 'as' => 'admin.showLanguages'));
  41.     Route::get('/admin/pages/', array('uses' => 'AdminController@Pages', 'as' => 'admin.showPages'));
  42.  
  43. });
  44.  
  45. Route::get("/lang/set/{lang}/","LanguageController@set");
  46.  
  47.  
  48. Route::post('/{slug}/','HomeController@savepage');
  49. Route::get('/{slug}/','HomeController@showpage');
Advertisement
RAW Paste Data Copied
Advertisement