laravel create variable in componet constructor code example Example: using get in laravel blade {{ request()->has('faq') ? request()->get('faq') : '' }}