コード例 #1
0
ファイル: P4Controller.php プロジェクト: JurgisLives/p4
 function getUpdate()
 {
     $type = new \App\Type();
     $type_to_update = $type->find(4);
     $type_to_update->type = "Pizza n' Subs";
     $type_to_update->save();
 }
コード例 #2
0
ファイル: routes.php プロジェクト: semmiverian/webJok
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
// Front End Controller
Route::resource('/', 'frontEndController');
// Produk FrontEnd Route
Route::get('productFront', 'frontEndController@Produkpage');
// Produk FrontEnd Route
Route::get('productFront/{id}', 'frontEndController@ProdukDetail');
// Produk FrontEnd Filter
Route::get('productFront/tipe/{id}', function ($id = 0) {
    $produk = App\Type::find($id)->produk()->where('type_id', '=', $id)->get();
    $tipe = App\Type::all();
    return view('FrontEnd.product', compact('produk', 'tipe'));
});
// News FrontEnd Route
Route::get('news', 'frontEndController@newsPage');
// Gallery FrontEnd Route
Route::get('gallery', 'frontEndController@galleryPage');
// News Detail FrontEnd Route
Route::get('news/{id}', 'frontEndController@newsDetail');
// Contact Us Route
Route::get('contactUs', 'frontEndController@contactUs');
//Send Message from Contact Us Page
Route::post('sendMessage', 'frontEndController@sendMessage');
// About us Route
Route::get('aboutus', 'frontEndController@aboutUs');