Laravel 7 Artisan error - Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request

天涯浪子 提交于 2021-01-29 15:40:29

问题


First of all I am kind of new in Laravel but I do like to learn and I really need your help fixing this error.

my project is cloned from my GitHub and all the steps i think I have done them as by the book :) however running Laravel installation at the end I've got the error

to be more specified.

  1. config.php is not present in config folder (in order to try as one suggestion rename it as config_ )
  2. I did tried without success all commands suggested in different resolutions php artisan cache:clear composer update composer dump-autoload

error right after installation

error trying artisan with bellow code live

I have read I think all of posts in regarding of this errors and trying all possibilities and actually found something but from here I've got stack

I understand that can be somewhere used url() or asset() - is the way I found the code bellow which is containing asset() and provoking this error but don't know what to use instead...

If I do get rid of the codes having asset in adminlte.php than artisan is working... any help on the correct code (how to replace those 3 asset add or what to change like for dummies :) will be much appreciated

    [
        'name' => 'SummerNote',
        'active' => true,
        'files' => [
            [
                'type' => 'css',
                'asset' => false,
                'location' => asset('vendor/summernote/summernote-bs4.css'),
            ],
            [
                'type' => 'js',
                'asset' => false,
                'location' => asset('vendor/summernote/summernote-bs4.min.js')
            ]
        ]
    ],
    [
    'name' => 'BsCustomFileInput',
    'active' => true,
    'files' => [
        [
            'type' => 'js',
            'asset' => false,
            'location' => asset('vendor/bs-custom-file-input/bs-custom-file-input.min.js')
        ]
    ]
]

] ];

code in configs/adminlte.php for artisan run

Thank you in advance if needed any other details I will be happy to provide and to have this fixed with your help.

来源:https://stackoverflow.com/questions/65887886/laravel-7-artisan-error-argument-2-passed-to-illuminate-routing-urlgenerator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!