Guest User

Untitled

a guest
Jan 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. public function edit($id)
  2. {
  3. $category = Categories::getall();
  4. $categories = Categories::find($id);
  5. return view('back.categories.edit', ['categories' => $categories, 'category' => $category]);
  6. }
  7.  
  8. Route::group(['middleware'=>'admin'],function(){
  9.  
  10. Route::get('/dashboard','BackendController@index')->name('backend');
  11. Route::group(['prefix' => 'categories'], function () {
  12. Route::any('/show/{id}', ['as' => 'backend.categories.show', 'uses' => 'backendCategoriesController@show']);
  13. Route::get('/index', ['as' => 'back.categories.index', 'uses' => 'backendCategoriesController@index']);
  14. Route::any('/store', ['as' => 'back.categories.store', 'uses' => 'backendCategoriesController@store']);
  15. Route::any('/create', ['as' => 'back.categories.create', 'uses' => 'backendCategoriesController@create']);
  16. Route::any('/edit/{id}', ['as' => 'back.categories.edit', 'uses' => 'backendCategoriesController@edit']);
  17. Route::any('/update', ['as' => 'back.categories.update', 'uses' => 'backendCategoriesController@update']);
  18. Route::any('/destroy/{id}', ['as' => 'back.categories.destroy', 'uses' => 'backendCategoriesController@destroy']);
  19. });
  20.  
  21. });
  22.  
  23. <a href="{{ url('back/categories/edit/'.$category->cat_id) }}" class="btn btn-success btn-sm">
  24. <span class="fa fa-edit"></span> edit</a>
Add Comment
Please, Sign In to add comment