laravel resource controller edit Not Working

Today, We want to share with you laravel resource controller edit Not Working.In this post we will show you laravel edit, delete show controller, hear for laravel controller update database we will give you demo and example for implement.In this post, we will learn about resource controller laravel command with an example.

laravel resource controller edit Not Working

There are the Following The simple About laravel edit route not working Full Information With Example and source code.

As I will cover this Post with live Working example to develop laravel update route, so the laravel destroy method is used for this example is following below.

Laravel is a web application framework with expressive, elegant syntax.The PHP Framework for Web Artisans,freeing you to create without sweating the small things. CRUD Operation With Server Side.

Keywords : laravel resource controller example,laravel update method,laravel update route,laravel destroy method,laravel controller update database,resource controller laravel command,laravel edit route not working,laravel delete controller,How to create Laravel Resource Controller with resource route,route resource in laravel 5.4,simple laravel crud function with resource controller,php artisan make:controller UserController,

Laravel, Show(), Edit (), update functions not working

Example 1

public function show(Task $task)
{
    dd(['task' => $task]);
    //return back()->with('success','Message Contents Are Already Shown');
}

Example 2

public function show($id)
{
    $task = Task::findOrFail($id);
    dd(['task' => $task]);
    //return back()->with('success','Message Contents Are Already Shown');
}

Laravel edit route not defined

Route::get('products/{products}/edit', 'RuanganjnsController@edit')->name('products-edit');

//use
{{route('products-edit', ['products' => $data->id])}}

Laravel 5.2 Route not working when using resource for CRUD operation

Route::resource('student', 'StudentController', ['names' => [
    'create' => 'student.build'
]]);
Route::resource('manager/post', 'PostController', ['except' => 'show', 'names' => [
    'store' => 'manager.post.store'
]]);
//Update
Route::group(['prefix' => 'manager', 'as' => 'manager.'], function () {
    Route::resource('post', 'PostController', ['except' => 'show']);
});

How to create Laravel Resource Controller with resource route?

Resource route

Route::resource('members', 'MemberController');
Route::get('members',['as'=>'members.index','uses'=>'MemberController@index']);
Route::post('members/create',['as'=>'members.store','uses'=>'MemberController@store']);
Route::get('members/edit/{id}',['as'=>'members.edit','uses'=>'MemberController@edit']);
Route::patch('members/{id}',['as'=>'members.update','uses'=>'MemberController@update']);
Route::delete('members/{id}',['as'=>'members.destroy','uses'=>'MemberController@destroy']);
Route::get('members/{id}',['as'=>'members.show','uses'=>'MemberController@show']);

Resource Controller

php artisan make:controller MemberController --resource --model=member

app/Http/Controllers/MemberController.php


Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about How to create Laravel Resource Controller with resource route.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment