Class ' Form' not found in view-file.blade.php

后端 未结 2 831
梦毁少年i
梦毁少年i 2021-01-19 17:17

I\'m trying to render a text input field in my view file. I keep getting this error: \"Class \'form\' not found in view-file.blade.php\"

Template:

         


        
相关标签:
2条回答
  • 2021-01-19 17:24

    Install laravelcollective/html

    composer require "laravelcollective/html":"^5.5"
    

    Update Composer

    composer update
    

    Add Provider and Static Facade in config/app.php

    <?php
    
    'providers' => [
    
        Collective\Html\HtmlServiceProvider::class,
    
      ],
    
    'aliases' => [
    
          'Form' => Collective\Html\FormFacade::class,
    
          'Html' => Collective\Html\HtmlFacade::class,
    
      ],
    
    0 讨论(0)
  • 2021-01-19 17:29

    This may be due to adding it into config/app before Composer was done installing it.

    Try using php artisan config:cache

    0 讨论(0)
提交回复
热议问题