I normally set my page titles like this:
@section('pageTitle', 'Awesome Page')
I then wanted to change page title based on selected language and tried this:
@section('pageTitle', @lang('my_account.pageTitle'))
However, I get this error:
FatalErrorException in b159db713cb664ba091b07db738bd4c3748de1cb.php line 1: Call to undefined function lang()
What is the correct syntax?
This works it seems, not sure if it's the smartest way to handle it though:
@section('pageTitle', trans('my_account.pageTitle') )
Use something like this:
@section('pageTitle')
@lang('app.pageTitle')
@endsection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With