https://dev.to/shanisingh03 #make-rest-api-in-laravel-9 Make REST API in LARAVEL 9 In this video i am going to explain about CRUD Operation using REST API.

* * @return void */ public function down() { Schema::dropIfExists('posts'); }}; Next update the Model fillable property in app/models/Post.php json([ 'status' => true, 'posts' => $posts ]); }

* * @param \App\Models\Post $post * @return \Illuminate\Http\Response */ public function edit(Post $post) { // }

* * @param \Illuminate\Http\Request $request * @param \App\Models\Post $post * @return \Illuminate\Http\Response */ public function update(StorePostRequest $request, Post $post) { $post->update($request->all()); return response()->json([ 'status' => true, 'message' => "Post Updated successfully!", 'post' => $post ], 200); }
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners