I tried passing a variable from livewire component:
class Index extends Component
{
public function render()
{
return view('livewire.index')->with('type', config('constants.NONAUTH'));
}
}
and accessing it from layouts.app:
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
{{dd($type)}}
@include('includes.head')
I get an error that $type is not defined, what is the correct way of doing this?