https://dev.to/manu_tech In this tutorial, I am going to take you through the basics in building a REST API in Laravel.

* * @return void */ public function down() { Schema::dropIfExists('posts'); }}; Exit fullscreen mode

Exit fullscreen mode #api-controller Api Controller json([ 'status' => true, 'post' => $posts ]); }

* * @param \App\Models\Post $post * @return \Illuminate\Http\Response */ public function show(Post $post) { $post = Post::find($post)->first(); return response()->json([ 'status' => true, 'post' => $post ]); }
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