Exemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy(PageName $pageName)
 {
     $pageName->delete();
     return redirect()->route('admin.pagename.index');
 }
Exemplo n.º 2
0
 * Shop categories routes
 */
Route::get('shops_category', 'ShopCategoriesController@index');
Route::post('shops_category', 'ShopCategoriesController@filter');
//Route::get('shops/{id}/mass_upload', 'ZaWeb\Shops\Http\Controllers\ShopController@massUpload');
/*
 * Items category
 */
Route::resource('items_category', 'ItemsCategoryController');
Route::post('getShop', ['uses' => 'ItemsCategoryController@getShop', 'as' => 'getShop']);
$router->post('/ads/flush', 'AdsController@flush');
$router->post('/questions/flush', 'QuestionsController@flush');
$router->post('/questions/upload', 'QuestionsController@store');
$router->post('/questions/{id}', 'QuestionsController@show');
$router->bind('pagename', function ($id) {
    return \AppAdmin\Models\PageName::find($id);
});
$router->bind('categories', function ($id) {
    return \App\Models\Category::find($id);
});
$router->bind('tags', function ($id) {
    return \App\Models\Tags::find($id);
});
$router->bind('ads', function ($id) {
    return \App\Models\Advertisement::find($id);
});
$router->bind('country', function ($title) {
    return \App\Models\Country::where('title', '=', $title)->first();
});
/**
 * PROFILE