gothinkster/laravel-realworld-example-app được TopGit xếp vào nhóm dự án backend, với 1.2k sao trên GitHub, viết chủ yếu bằng PHP. Exemplary real world backend API built with Laravel
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Make sure you set the correct database connection information before running the migrations Environment variables
php artisan migrate
php artisan serve
Database seeding
Populate 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
database/seeds/DummyDataSeeder.php
Run the database seeder and you're done
php artisan db:seed
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
The api can be accessed at http://localhost:8000/api.
API Specification
This application adheres to the api specifications set by the Thinkster team. This helps mix and match any backend with any other frontend without conflicts.
Full API Spec
More information regarding the project can be found here https://github.com/gothinkster/realworld
Code overview
Dependencies
jwt-auth - For authentication using JSON Web Tokens
laravel-cors - For handling Cross-Origin Resource Sharing (CORS)
Folders
app - Contains all the Eloquent models
app/Http/Controllers/Api - Contains all the api controllers
app/Http/Middleware - Contains the JWT auth middleware
app/Http/Requests/Api - Contains all the api form requests
app/RealWorld/Favorite - Contains the files implementing the favorite feature
app/RealWorld/Filters - Contains the query filters used for filtering api requests
app/RealWorld/Follow - Contains the files implementing the follow feature
app/RealWorld/Paginate - Contains the pagination class used to paginate the result
app/RealWorld/Slug - Contains the files implementing slugs to articles
app/RealWorld/Transformers - Contains all the data transformers
config - Contains all the application configuration files
database/factories - Contains the model factory for all the models
database/migrations - Contains all the database migrations
database/seeds - Contains the database seeder
routes - Contains all the api routes defined in api.php file
tests - Contains all the application tests
tests/Feature/Api - Contains all the api tests
Environment variables
.env - Environment variables can be set in this file
Note : You can quickly set the database information and other variables in this file and have the application fully working.
Testing API
Run the laravel development server
php artisan serve
The api can now be accessed at
http://localhost:8000/api
Request headers
Required
Key
Value
Yes
Content-Type
application/json
Yes
X-Requested-With
XMLHttpRequest
Optional
Authorization
Token {JWT}
Refer the api specification for more info.
Authentication
This applications uses JSON Web Token (JWT) to handle authentication. The token is passed with each request using the Authorization header with Token scheme. The JWT authentication middleware handles the validation and authentication of the token. Please check the following sources to learn more about JWT.
This applications has CORS enabled by default on all API endpoints. The default configuration allows requests from http://localhost:3000 and http://localhost:4200 to help speed up your frontend testing. The CORS allowed origins can be changed by setting them in the config file. Please check the following sources to learn more about CORS.
gothinkster/laravel-realworld-example-app có bao nhiêu sao?
gothinkster/laravel-realworld-example-app có 1.2k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/gothinkster/laravel-realworld-example-app. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
gothinkster/laravel-realworld-example-app có những chủ đề gì?
GitHub topics của gothinkster/laravel-realworld-example-app: "backend", "codebase", "crud", "demo-app", "jwt", "laravel", "realworld", "rest-api". TopGit xếp repo vào nhóm Backend.
gothinkster/laravel-realworld-example-app còn đang phát triển không?
Commit gần nhất trên gothinkster/laravel-realworld-example-app là 4.3 năm trước (theo timestamp GitHub). Repo có 1.0k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
gothinkster/laravel-realworld-example-app là gì?
gothinkster/laravel-realworld-example-app (gothinkster/laravel-realworld-example-app) là dự án PHP trên GitHub. Theo mô tả gốc: Exemplary real world backend API built with Laravel
gothinkster/laravel-realworld-example-app so với các dự án Backend khác thế nào?
gothinkster/laravel-realworld-example-app được TopGit xếp vào nhóm Backend, với 1.2k sao GitHub và viết bằng PHP. Xem trang chủ đề Backend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
gothinkster/laravel-realworld-example-app viết bằng ngôn ngữ gì?
gothinkster/laravel-realworld-example-app chủ yếu viết bằng PHP. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao gothinkster/laravel-realworld-example-app được xếp vào nhóm Backend?
TopGit xếp gothinkster/laravel-realworld-example-app vào nhóm Backend dựa trên GitHub topics và mô tả của repo (gắn thẻ: "backend", "codebase", "crud"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về laravel-realworld-example-app?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về laravel-realworld-example-app.