Skip to content

Instantly share code, notes, and snippets.

@rajikaimal
Last active August 25, 2017 02:56
Show Gist options
  • Save rajikaimal/89a4f848c8e3c1b8f520 to your computer and use it in GitHub Desktop.
Save rajikaimal/89a4f848c8e3c1b8f520 to your computer and use it in GitHub Desktop.
Laravel routes
//add extra extension to render pure html alongside with php
View::addExtension('html', 'php');
Route::get('/blog', function() {
return view('Blog');
});
//route for inserting
Route::post('/tweets/create', 'BlogController@create');
//route for deleting
Route::post('/tweets/delete', 'BlogController@delete');
//route for updating
Route::post('/tweets/edit', 'BlogController@edit');
//route for retrieving all
Route::get('/tweets/all', 'BlogController@getall');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment