Checks if user variable exist before using its properties

This commit is contained in:
Ivan Nieto Vivanco 2023-03-29 10:33:15 -06:00
parent c9d1274edc
commit d7c531e1c7

View file

@ -1,8 +1,11 @@
@extends('layouts/default')
@php
!empty($user) ? $full_name = $user->present()->full_name : $full_name = '';
@endphp
{{-- Page title --}}
@section('title')
{{ trans('general.accept_assets', array('name' => $user->present()->fullName())) }}
{{ trans('general.accept_assets', array('name' => $full_name)) }}
@parent
@stop