1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

LaravelでAPIを作成

Posted at

背景

Unityで使用するAPIをPHPで作成した時のまとめ

開発環境

  • PHP v7.3.20
  • Laravel v7.20.0
  • Apache 2.4.43

手順

  • コントローラ作成
php artisan make:controller API/APIController  

コントローラにindexメソッドを作成する

  • route設定
api.php  
Route::match(['get', 'post'], '/path', 'API\APIController@index')  
  • ローカルサーバを立ち上げる
php artisan serve  
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?