在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):gothinkster/laravel-realworld-example-app开源软件地址(OpenSource Url):https://github.com/gothinkster/laravel-realworld-example-app开源编程语言(OpenSource Language):PHP 98.1%开源软件介绍(OpenSource Introduction):
This repo is functionality complete — PRs and issues welcome! Getting startedInstallationPlease check the official laravel installation guide for server requirements before you start. Official Documentation Alternative installation is possible without local dependencies relying on Docker. Clone the repository
Switch to the repo folder
Install all the dependencies using composer
Copy the example env file and make the required configuration changes in the .env file
Generate a new application key
Generate a new JWT authentication secret key
Run the database migrations (Set the database connection in .env before migrating)
Start the local development server
You can now access the server at http://localhost:8000 TL;DR command list
Make sure you set the correct database connection information before running the migrations Environment variables
Database seedingPopulate the database with seed data with relationships which includes users, articles, comments, tags, favorites and follows. This can help you to quickly start testing the api or couple a frontend and start using it with ready content. Open the DummyDataSeeder and set the property values as per your requirement
Run the database seeder and you're done
Note : It's recommended to have a clean database before seeding. You can refresh your migrations at any point to clean the database by running the following command
DockerTo install with Docker, run following commands:
The api can be accessed at http://localhost:8000/api. API SpecificationThis application adheres to the api specifications set by the Thinkster team. This helps mix and match any backend with any other frontend without conflicts. More information regarding the project can be found here https://github.com/gothinkster/realworld Code overviewDependencies
Folders
Environment variables
Note : You can quickly set the database information and other variables in this file and have the application fully working. Testing APIRun the laravel development server
The api can now be accessed at
Request headers
Refer the api specification for more info. AuthenticationThis applications uses JSON Web Token (JWT) to handle authentication. The token is passed with each request using the Cross-Origin Resource Sharing (CORS)This applications has CORS enabled by default on all API endpoints. The default configuration allows requests from
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论