简体   繁体   中英

API Centric web application in laravel

Recently assigned to a new project where we need to build a api centric web application. Requirement is to build 2 separate projects in Laravel one the has all API's that can be accessed by either web or mobile applications(for future purpose) and other is a web application that uses the API's to work almost all of its function.

Building an API project in Laravel is a easy and lots of tutorials are available about using passport etc. But how do i implement that API to web application.

My major question is how do i setup authentication for web application using api, because its default authentication is model based, or my approach is wrong?

Please suggest ideas, because we are currently in planning phase.

Thanks in advance

每个Laravel项目都将被标识为其自己的“站点”,因此,我唯一的建议是,如果您打算通过AJAX调用来调用API,请警惕跨域脚本问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM