call to undefiend function asset() in blade view lumen laravl [duplicate]

  laravel, lumen, php

I installed a fresh installation of laravel lumen

"laravel/lumen-framework": "^8.0"

created a controller that returns a view

public function register(){
        return view('register');
    }

view file

<link rel="stylesheet" type="text/css" href="{{asset('css/opensans-font.css')}}" />

im trying to use the asset function but it throws an undefined exception

Call to undefined function asset() (View: C:xampphtdocsraziresourcesviewsregister.blade.php)

i tried updating and reinstalling dependencies but it didn’t work

Source: Laravel

Leave a Reply