Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function edit($id)
- {
- $category = Categories::getall();
- $categories = Categories::find($id);
- return view('back.categories.edit', ['categories' => $categories, 'category' => $category]);
- }
- Route::group(['middleware'=>'admin'],function(){
- Route::get('/dashboard','BackendController@index')->name('backend');
- Route::group(['prefix' => 'categories'], function () {
- Route::any('/show/{id}', ['as' => 'backend.categories.show', 'uses' => 'backendCategoriesController@show']);
- Route::get('/index', ['as' => 'back.categories.index', 'uses' => 'backendCategoriesController@index']);
- Route::any('/store', ['as' => 'back.categories.store', 'uses' => 'backendCategoriesController@store']);
- Route::any('/create', ['as' => 'back.categories.create', 'uses' => 'backendCategoriesController@create']);
- Route::any('/edit/{id}', ['as' => 'back.categories.edit', 'uses' => 'backendCategoriesController@edit']);
- Route::any('/update', ['as' => 'back.categories.update', 'uses' => 'backendCategoriesController@update']);
- Route::any('/destroy/{id}', ['as' => 'back.categories.destroy', 'uses' => 'backendCategoriesController@destroy']);
- });
- });
- <a href="{{ url('back/categories/edit/'.$category->cat_id) }}" class="btn btn-success btn-sm">
- <span class="fa fa-edit"></span> edit</a>
Add Comment
Please, Sign In to add comment