Change some first Eloquent methods to firstOrFail
This commit is contained in:
parent
e3fff4b9a8
commit
64f541d30d
4 changed files with 6 additions and 5 deletions
|
@ -269,7 +269,7 @@ class MicropubClientController extends Controller
|
|||
];
|
||||
if ($request->session()->has('me')) {
|
||||
$data['me'] = normalize_url($request->session()->get('me'));
|
||||
$user = IndieWebUser::where('me', $request->session()->get('me'))->first();
|
||||
$user = IndieWebUser::where('me', $request->session()->get('me'))->firstOrFail();
|
||||
$data['token'] = $user->token ?? 'none defined';
|
||||
$data['syndication'] = $user->syndication ?? 'none defined';
|
||||
$data['media-endpoint'] = $user->mediaEndpoint ?? 'none defined';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue