laravel-5.8

Laravel 5.8 custom command not found

旧街凉风 提交于 2020-12-15 11:45:28
问题 I have created a custom command using artisan: php artisan make:command resetNegotiations Than deleted cache with: php artisan cache:clear But if I try to run: php artisan ResetNegotiations I got the error: Command "ResetNegotiations" is not defined. The file ResetNegotiations.php exists in app/Console/Commands I have found similar questions: - Command is not defined exception but it not fixed mine. I have updated the kernel as https://laravel.com/docs/5.8/artisan#registering-commands in app

Getting exception while create Token using passport Laravel

耗尽温柔 提交于 2020-12-12 11:48:13
问题 Everything is working fine till yesterday. But Today while login through api I am getting an exception while creating token. Exception is : Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated. I don't know where things go wrong. If you have any solution it will really appreciate it, Thanks. code for creating token : $user->createToken('fullaccess')->accessToken; 回答1: I too faced the same issue, a quick solution will

Laravel 5.8 - Class 'Arr' not found

耗尽温柔 提交于 2020-12-10 02:03:09
问题 I've upgraded to Laravel 5.8 One of the changes as per the docs in 5.8 is that All array_* and str_* global helpers have been deprecated (https://laravel.com/docs/5.8/upgrade#string-and-array-helpers) In my blade view I have the following: {{ (Arr::has($queryString, 'industry') ? Arr::get($queryString, 'industry') : '') }} This is throwing error: Class 'Arr' not found... If I include the full name space then it works: {{ (Illuminate\Support\Arr::has($queryString, 'industry') ? Illuminate

Argument 2 passed to Maatwebsite\Excel\Excel::download() must be of the type string, object given

人走茶凉 提交于 2020-08-11 04:59:34
问题 Argument 2 passed to Maatwebsite\Excel\Excel::download() must be of the type string, object given, called in C:\xampp\htdocs\student_route\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 237 public function excel_report() { $student_data = DB::table('student_details')->get()->toArray(); $student_array[] = array('Name', 'Address', 'Roll No', 'Class'); foreach($student_data as $student) { $student_array[] = array( 'Student Name' => $student->st_name, 'Address' =>