{"image_url":null,"author_name":"chichi1091","width":"100%","blog_title":"Believe you can","published":"2021-11-03 00:04:40","url":"https://chichi1091.hatenablog.jp/entry/2021/11/03/000440","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchichi1091.hatenablog.jp%2Fentry%2F2021%2F11%2F03%2F000440\" title=\"Laravel\u3067RESTfulAPI\u3092\u4f5c\u308b\u301c\u305d\u306e2\u301c - Believe you can\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/chichi1091/","type":"rich","categories":["Laravel","php"],"title":"Laravel\u3067RESTfulAPI\u3092\u4f5c\u308b\u301c\u305d\u306e2\u301c","height":"190","description":"Laravel\u3067API\u3092\u4f5c\u308b\u306e\u6700\u7d42\u56de\u3067\u3059\u3002MySQL\u3068\u306e\u63a5\u7d9a\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002 Model\u306e\u4f5c\u6210 Laravel\u306eORM\u3001Eloquent\uff08\u30a8\u30ed\u30af\u30a2\u30f3\u30c8\uff09\u3092\u4f7f\u3063\u3066\u3044\u304d\u307e\u3059\u3002 PHP\u304c\u52d5\u3044\u3066\u3044\u308bDocker\u30b3\u30f3\u30c6\u30ca\u306b\u5165\u3063\u3066 artisan \u30b3\u30de\u30f3\u30c9\u3067Model\u3092\u4f5c\u308a\u307e\u3059\u3002 $ docker-compose exec php bash $ php artisan make:model Todos -f App/Models \u914d\u4e0b\u306b Todos.php \u304c\u4f5c\u3089\u308c\u307e\u3059\u3002 class Todos extends Model { use HasFactory; } class TodosFactory e\u2026","blog_url":"https://chichi1091.hatenablog.jp/","version":"1.0","provider_url":"https://hatena.blog","provider_name":"Hatena Blog"}