Файл: app/Http/Controllers/API/AccountController.php
Строк: 26
<?php
namespace AppHttpControllersAPI;
use AppHttpControllersController;
use AppHttpResourcesAccountResource;
use IlluminateHttpRequest;
class AccountController extends Controller
{
/**
* Display the resource.
*
* @param Request $request
* @return AccountResource|IlluminateHttpJsonResponse
*/
public function index(Request $request)
{
if ($request->user()) {
return AccountResource::make($request->user());
}
return response()->json([
'message' => __('Resource not found.'),
'status' => 404
], 404);
}
}