Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (18 sloc) 628 Bytes
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
// 同一クラス名となりますので、このサンプルではファサードを別名としています
use Illuminate\Support\Facades\Response as LaravelResponse;
use function response;
class JsonAction
public function __invoke(Request $request): JsonResponse
$response = LaravelResponse::json(['status' => 'success']);
// ヘルパー関数を利用する場合
$response = response()->json(['status' => 'success']);
return $response;
You can’t perform that action at this time.