Hudya
1 min readJun 13, 2019

--

saya pengennya di web.php aja kok, kalo emang pengen dimasukkin ke api.php juga bisa. Bedanya sesuai dokumentasi aja.

All Laravel routes are defined in your route files, which are located in the routes directory. These files are automatically loaded by the framework. The routes/web.php file defines routes that are for your web interface. These routes are assigned the web middleware group, which provides features like session state and CSRF protection. The routes in routes/api.php are stateless and are assigned the api middleware group.

Kalo kita pake web.php kenanya ya web middleware group, kalo di api ya di api middleware group, dan kalo web kita perlu matiin CSRFnya, makanya disini saya kasitau biar kalo pengen matiin bisa tau juga~

--

--

Hudya
Hudya

Written by Hudya

Which is more difficult, coding or counting? Not both of them, the difficult one is sharing your knowledge to people without asking the payment.

No responses yet