Recommend this page to a friend! |
Download .zip |
Info | Example | View files (96) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-01-15 (13 days ago) | Not enough user ratings | Total: 61 This week: 4 | All time: 10,033 This week: 45 |
Version | License | PHP version | Categories | |||
articles 1.0 | The PHP License | 5 | PHP 5, Content management, Web services |
Description | Author | |
This package can manage collections of articles using API requests. |
This is an articles API that create, fetch, search, delete, update and rate articles. Authentication was implemented on endpoints that requires a user to create, update or delete an article using Laravel Passport. A user is thus required to pass the bearer token to these endpoints.
The endpoints for authentication:
/api/register
Method - POST
Body - name, email, password
/api/login
Method - POST
Body -email, password
The endpoints for articles:
/api/articles
Method ? POST
Body ? title, body
/api/articles
Method ? GET
/api/articles/{id}
Method ? GET
/api/articles/{id}
Method ? PUT
Body - title, body
/api/articles/{id}
Method ? DELETE
/api/articles/{id}/rating
Method ? POST
Body - rating (must be between 1 - 5)
/api/articles/search/{query}
Method ? GET
To get started: + clone or download source code (unzip) + cd to project folder + Set database credentials in .env file + Run composer install + Run php artisan migrate for migrations + Run php artisan passport:install to set up encryption keys to generate tokens + Run php artisan serve to test endpoints + You can run php artisan db:seed to work with existing data
Files |
File | Role | Description | ||
---|---|---|---|---|
.idea (7 files) | ||||
app (2 files, 5 directories) | ||||
bootstrap (1 file) | ||||
config (13 files) | ||||
database (3 directories) | ||||
public (4 files, 2 directories) | ||||
resources (4 directories) | ||||
routes (4 files) | ||||
tests (2 files, 2 directories) | ||||
.editorconfig | Data | Auxiliary data | ||
.env.example | Data | Auxiliary data | ||
.styleci.yml | Data | Auxiliary data | ||
artisan | Class | Class source | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
readme.md | Doc. | Documentation | ||
server.php | Aux. | Auxiliary script | ||
webpack.mix.js | Data | Auxiliary data |
Files | / | .idea |
File | Role | Description |
---|---|---|
articles-api.iml | Data | Auxiliary data |
encodings.xml | Data | Auxiliary data |
misc.xml | Data | Auxiliary data |
modules.xml | Data | Auxiliary data |
php.xml | Data | Auxiliary data |
vcs.xml | Data | Auxiliary data |
workspace.xml | Data | Auxiliary data |
Files | / | app |
File | Role | Description | ||
---|---|---|---|---|
Console (1 file) | ||||
Exceptions (1 file) | ||||
Http (1 file, 2 directories) | ||||
Libraries (1 file) | ||||
Providers (5 files) | ||||
Article.php | Class | Class source | ||
User.php | Class | Class source |
Files | / | app | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Controllers (4 files, 1 directory) | ||||
Middleware (7 files) | ||||
Kernel.php | Class | Class source |
Files | / | app | / | Http | / | Controllers |
File | Role | Description | ||
---|---|---|---|---|
Auth (5 files) | ||||
ArticleController.php | Class | Class source | ||
AuthController.php | Class | Class source | ||
Controller.php | Class | Class source | ||
HomeController.php | Class | Class source |
Files | / | app | / | Http | / | Controllers | / | Auth |
File | Role | Description |
---|---|---|
ForgotPasswordController.php | Class | Class source |
LoginController.php | Class | Class source |
RegisterController.php | Class | Class source |
ResetPasswordController.php | Class | Class source |
VerificationController.php | Class | Class source |
Files | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
Authenticate.php | Class | Class source |
CheckForMaintenanceMode.php | Class | Class source |
EncryptCookies.php | Class | Class source |
RedirectIfAuthenticated.php | Class | Class source |
TrimStrings.php | Class | Class source |
TrustProxies.php | Class | Class source |
VerifyCsrfToken.php | Class | Class source |
Files | / | app | / | Providers |
File | Role | Description |
---|---|---|
AppServiceProvider.php | Class | Class source |
AuthServiceProvider.php | Class | Class source |
BroadcastServiceProvider.php | Class | Class source |
EventServiceProvider.php | Class | Class source |
RouteServiceProvider.php | Class | Class source |
Files | / | config |
File | Role | Description |
---|---|---|
app.php | Class | Class source |
auth.php | Class | Class source |
broadcasting.php | Aux. | Auxiliary script |
cache.php | Aux. | Auxiliary script |
database.php | Aux. | Auxiliary script |
filesystems.php | Aux. | Auxiliary script |
hashing.php | Aux. | Auxiliary script |
logging.php | Class | Class source |
mail.php | Aux. | Auxiliary script |
queue.php | Aux. | Auxiliary script |
services.php | Class | Class source |
session.php | Aux. | Auxiliary script |
view.php | Aux. | Auxiliary script |
Files | / | database | / | migrations |
File | Role | Description |
---|---|---|
2014_10_12_000000_create_users_table.php | Class | Class source |
2014_10_12_100000_...rd_resets_table.php | Class | Class source |
2019_09_09_104651_..._articles_table.php | Class | Class source |
Files | / | database | / | seeds |
File | Role | Description |
---|---|---|
ArticlesSeeder.php | Class | Class source |
DatabaseSeeder.php | Class | Class source |
Files | / | public |
File | Role | Description | ||
---|---|---|---|---|
css (1 file) | ||||
js (1 file) | ||||
.htaccess | Data | Auxiliary data | ||
index.php | Class | Class source | ||
robots.txt | Doc. | Documentation | ||
web.config | Data | Auxiliary data |
Files | / | resources |
Files | / | resources | / | js |
File | Role | Description | ||
---|---|---|---|---|
components (1 file) | ||||
app.js | Data | Auxiliary data | ||
bootstrap.js | Data | Auxiliary data |
Files | / | resources | / | lang | / | en |
File | Role | Description |
---|---|---|
auth.php | Aux. | Auxiliary script |
pagination.php | Aux. | Auxiliary script |
passwords.php | Aux. | Auxiliary script |
validation.php | Aux. | Auxiliary script |
Files | / | resources | / | sass |
File | Role | Description |
---|---|---|
app.scss | Data | Auxiliary data |
_variables.scss | Data | Auxiliary data |
Files | / | resources | / | views |
File | Role | Description | ||
---|---|---|---|---|
auth (3 files, 1 directory) | ||||
layouts (1 file) | ||||
home.blade.php | Aux. | Auxiliary script | ||
welcome.blade.php | Aux. | Auxiliary script |
Files | / | resources | / | views | / | auth |
File | Role | Description | ||
---|---|---|---|---|
passwords (2 files) | ||||
login.blade.php | Aux. | Auxiliary script | ||
register.blade.php | Aux. | Auxiliary script | ||
verify.blade.php | Aux. | Auxiliary script |
Files | / | resources | / | views | / | auth | / | passwords |
File | Role | Description |
---|---|---|
email.blade.php | Aux. | Auxiliary script |
reset.blade.php | Aux. | Auxiliary script |
Files | / | routes |
File | Role | Description |
---|---|---|
api.php | Aux. | Auxiliary script |
channels.php | Example | Example script |
console.php | Example | Example script |
web.php | Example | Example script |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Feature (1 file) | ||||
Unit (1 file) | ||||
CreatesApplication.php | Class | Class source | ||
TestCase.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.