basic CRUD for listings
This commit is contained in:
30
README.md
30
README.md
@@ -97,7 +97,7 @@ For troubleshooting purposes, note that the containers still can access real pat
|
||||
|
||||
## Testing
|
||||
|
||||
You should install an HTTP request client like Insomnia. Make sure you are setting the `Accept: application/json` and `Referer: http://localhost` headers in all requests -- this application is not designed to generate any HTML views, aside from email messages and the password reset page. (The Insomnia project already does this.)
|
||||
You should install an HTTP request client like Insomnia. Make sure you are setting the `Accept: application/json` and `Referer: localhost` headers in all requests (the Insomnia project already does this) -- this application is not designed to generate any HTML views, aside from email messages and the password reset page.
|
||||
|
||||
### List all Routes
|
||||
|
||||
@@ -121,6 +121,32 @@ Authentication is handled by Laravel Sanctum and Laravel Fortify. Instead of usi
|
||||
|
||||
`POST /logout`
|
||||
|
||||
#### Application Routes
|
||||
### Application Routes
|
||||
|
||||
`GET /api/user`
|
||||
|
||||
#### Listings Resource
|
||||
|
||||
A group of [resource routes](https://laravel.com/docs/12.x/controllers#resource-controllers) created by Laravel for standard CRUD operations.
|
||||
|
||||
`GET /api/listing`
|
||||
|
||||
`POST /api/listing`
|
||||
|
||||
`GET /api/listing/{listing}`
|
||||
|
||||
`PUT/PATCH /api/listing/{listing}`
|
||||
|
||||
`DELETE /api/listing/{listing}`
|
||||
|
||||
|
||||
### Verifying your Email
|
||||
|
||||
New accounts need to have their emails marked as verified in order to post on the site. For testing purposes, you don't need to send an actual email, you can just update the database:
|
||||
|
||||
```bash
|
||||
sail php artisan serve
|
||||
> $u = User::find(1);
|
||||
> $u->email_verified_at = now();
|
||||
> $u->save();
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user