Recommend this page to a friend! |
Download .zip |
Info | Example | View files (87) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-09-11 (Yesterday) | Not yet rated by the users | Total: 29 This week: 1 | All time: 10,285 This week: 182 |
Version | License | PHP version | Categories | |||
training-server 1.0.0 | MIT/X Consortium ... | 5 | HTTP, PHP 5, Libraries, Web services |
Description | Author | ||||||||
This package provides an implementation of a REST API for learning purposes. |
|
TrainingServer contains several REST endpoints e.q. with oAuth/basic authentication, which you can use for learning RestControl.
make build
make first-run
make start
# Run all tests
make run-tests
(GET) http://IP_ADDR/plain/users
Sample response:
[
[
"id": 1,
"name": "Sample name",
"email": "sample@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
[
"id": 2,
"name": "Sample name",
"email": "another@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
]
(GET) http://ID_ADDR/plain/files/csv (GET) http://ID_ADDR/plain/files/css (GET) http://ID_ADDR/plain/files/js (GET) http://ID_ADDR/plain/files/png (GET) http://ID_ADDR/plain/cookies
(GET) http://IP_ADDR/basi-auth
Sample response:
[
"status": "ok"
]
(POST) http://IP_ADDR/oauth2/token
> Form params: > - grant_type(optional): password, client_credentials > - client_id: string > - client_secret: string > - username: string > - password: string > - scope(optional): string > > Seeds: > - Password grant client > - client_id: 10 > - client_secret: F0NVue12qNwayx3pKJLHfJmQouOZg40YZafjjdHZ
(GET) http://ID_ADDR/oauth2/users - Return list of users.
>Headers: > - Content-Type: application/json > - Authorization: Bearer ACCESS_TOKEN > >
Sample response:
[
[
"id": 1,
"name": "Sample name",
"email": "sample@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
[
"id": 2,
"name": "Sample name",
"email": "another@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
]
Files | / | Docker |
File | Role | Description |
---|---|---|
cli.docker | Data | Auxiliary data |
docker.yml | Data | Auxiliary data |
fpm.docker | Data | Auxiliary data |
mysite.template | Data | Auxiliary data |
nginx.docker | Data | Auxiliary data |
Files | / | server |
File | Role | Description | ||
---|---|---|---|---|
app (1 file, 4 directories) | ||||
bootstrap (1 file) | ||||
config (13 files) | ||||
database (3 directories) | ||||
public (3 files, 2 directories) | ||||
resources (4 directories) | ||||
routes (3 files) | ||||
.env | Data | Auxiliary data | ||
.env.example | Data | Auxiliary data | ||
artisan | Class | Class source | ||
composer.json | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
server.php | Aux. | Auxiliary script | ||
webpack.mix.js | Data | Auxiliary data | ||
yarn.lock | Data | Auxiliary data |
Files | / | server | / | app |
File | Role | Description | ||
---|---|---|---|---|
Console (1 file) | ||||
Exceptions (1 file) | ||||
Http (1 file, 1 directory) | ||||
Providers (5 files) | ||||
User.php | Class | Class source |
Files | / | server | / | app | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Middleware (6 files) | ||||
Kernel.php | Class | Class source |
Files | / | server | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
AuthenticateOnceWithBasicAuth.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 | / | server | / | 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 | / | server | / | 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 | Aux. | Auxiliary script |
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 | / | server | / | database |
File | Role | Description | ||
---|---|---|---|---|
factories (1 file) | ||||
migrations (1 file) | ||||
seeds (3 files) |
Files | / | server | / | database | / | migrations |
File | Role | Description |
---|---|---|
2014_10_12_000000_create_users_table.php | Class | Class source |
Files | / | server | / | database | / | seeds |
File | Role | Description |
---|---|---|
DatabaseSeeder.php | Class | Class source |
OAuthSeeder.php | Class | Class source |
UsersSeeder.php | Class | Class source |
Files | / | server | / | public |
File | Role | Description | ||
---|---|---|---|---|
css (1 file) | ||||
js (1 file) | ||||
.htaccess | Data | Auxiliary data | ||
index.php | Class | Class source | ||
robots.txt | Doc. | Documentation |
Files | / | server | / | resources | / | assets |
File | Role | Description | ||
---|---|---|---|---|
js (2 files, 1 directory) | ||||
sample-files (4 files) | ||||
sass (2 files) |
Files | / | server | / | resources | / | assets | / | js |
File | Role | Description | ||
---|---|---|---|---|
components (1 file) | ||||
app.js | Data | Auxiliary data | ||
bootstrap.js | Data | Auxiliary data |
Files | / | server | / | resources | / | assets | / | js | / | components |
File | Role | Description |
---|---|---|
ExampleComponent.vue | Data | Auxiliary data |
Files | / | server | / | resources | / | assets | / | sample-files |
File | Role | Description |
---|---|---|
sample.css | Data | Auxiliary data |
sample.csv | Data | Auxiliary data |
sample.js | Data | Auxiliary data |
sample.png | Icon | Icon image |
Files | / | server | / | resources | / | assets | / | sass |
File | Role | Description |
---|---|---|
app.scss | Data | Auxiliary data |
_variables.scss | Data | Auxiliary data |
Files | / | server | / | 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 | / | server | / | routes |
File | Role | Description |
---|---|---|
api.php | Example | Example script |
channels.php | Example | Example script |
console.php | Example | Example script |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
tests (8 files, 2 directories) | ||||
composer.json | Data | Auxiliary data | ||
rest-control.yml | Data | Auxiliary data |
Files | / | tests | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Objects (1 file) | ||||
ServerResponses (2 files) | ||||
CookieTest.php | Class | Class source | ||
ExpressionLanguageTest.php | Class | Class source | ||
FilesTest.php | Class | Class source | ||
HasItemsTest.php | Class | Class source | ||
HasItemTest.php | Class | Class source | ||
HttpBasicAuthTest.php | Class | Class source | ||
HttpStatusCodesTest.php | Class | Class source | ||
JsonPathTest.php | Class | Class source |
Files | / | tests | / | tests | / | ServerResponses |
File | Role | Description |
---|---|---|
GetUser.php | Class | Class source |
GetUsers.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.