todo laravel dingo api swagger
1.0.0
간단한 API는 Laravel로 구축된 ToDo 리스트를 관리한다.
PHP 7.3 or higher
Laravel 8.0 or higher
Clone the repo locally:
git clone [email protected]:colyii/clara-coly-todo.git
cd clara-coly-todo
Install dependencies
composer install
Copy the contents of .env.example
to a .env
file, or simply run this command:
# Mac Linux
cp .env.example .env
# Windows
copy .env.example .env
Generate application key (if not already generated)
php artisan key:generate
Run database migrations
php artisan migrate
Run database seed
php artisan db:seed
Run the dev server (the output will give the address):
php artisan serve --host=127.0.0.1 --port=8000
./vendor/bin/pest --filter TodoTest
or
php artisan test
// 成功
{
"success" : 1 ,
"message" : " TODOを表示しました。 " ,
"status_code" : 200 ,
"data" : {
"id" : 4 ,
...
"created_at" : " 2022-08-24 00:12:47 " ,
"updated_at" : " 2022-08-24 00:12:47 " ,
...
}
}
// 失败
{
"success" : 0 ,
"message" : " TODO情報が見つかりませんでした。 " ,
"status_code" : 404
}
https://todo-laravel-dingo-api-swagger.herokuapp.com/