laravel-5.6

Windows 10 PDOException with message 'could not find driver' Laravel 5.6.33 Wampserver 3.1.7 x86

本秂侑毒 提交于 2020-01-07 09:19:50
问题 I know there is a lot on this topic around StackOverflow, but my problem is that i have php extensions already uncommented, i have made the required changes to database.php and .env and i have declared and used the necessary environment path. The only thing i haven't done is install composer due to my proxy restrictions. I have a proxy that is over a kerberos windows AD, and for some reason nothing that used to work with proxy address, port and credentials (user and password) is working

Modify php.ini on Laravel Homestead

放肆的年华 提交于 2020-01-06 06:40:48
问题 Is there anyway to change the php.ini file on Laravel homestead? For instance, I want to have the short_open_tags set to On - however I can't see an easy way to do this - Apart from going into the php.ini file and changing it every single time I boot homestead?? I can't be doing that each time. There has to be an easier way to simply override some settings in Laravel homestead. What if I want larger file uploading, different time local etc? How can I achieve this? I've tried using the ini_set

Modify php.ini on Laravel Homestead

ε祈祈猫儿з 提交于 2020-01-06 06:40:22
问题 Is there anyway to change the php.ini file on Laravel homestead? For instance, I want to have the short_open_tags set to On - however I can't see an easy way to do this - Apart from going into the php.ini file and changing it every single time I boot homestead?? I can't be doing that each time. There has to be an easier way to simply override some settings in Laravel homestead. What if I want larger file uploading, different time local etc? How can I achieve this? I've tried using the ini_set

Laravel 5.6 withCount and where statement

好久不见. 提交于 2020-01-04 09:39:15
问题 I'm using laravel 5.6. I have 3 tables : players, games and game_player table. Retrieving the game count of every player is easy with this in the index action of the PlayersController: //Get game count of every player $players = Player::withCount('games')->get(); Is there a way to retrieve the game count for the games when the player has won the game? (in the index action of the playerscontroller) I'm not sure how to do this. Can someone help? games table migration $table->integer('winner')-

Laravel using Sum and Groupby

♀尐吖头ヾ 提交于 2019-12-31 03:01:42
问题 I would like to fetch sum of quantity in each month, so that I can display on bar chart quantities against month This is what I thought but didn't workout $data1 = Borrow::groupBy(function($d) { return Carbon::parse($d->created_at)->format('m')->sum('quantity'); })->get(); My table structure Schema::create('borrows', function (Blueprint $table) { $table->increments('id'); $table->integer('member_id'); $table->integer('book_id'); $table->integer('quantity'); $table->integer('status')->default

Laravel using Sum and Groupby

本小妞迷上赌 提交于 2019-12-31 03:01:26
问题 I would like to fetch sum of quantity in each month, so that I can display on bar chart quantities against month This is what I thought but didn't workout $data1 = Borrow::groupBy(function($d) { return Carbon::parse($d->created_at)->format('m')->sum('quantity'); })->get(); My table structure Schema::create('borrows', function (Blueprint $table) { $table->increments('id'); $table->integer('member_id'); $table->integer('book_id'); $table->integer('quantity'); $table->integer('status')->default

htmlspecialchars() expects parameter 1 to be string, array given Laravel 5.6

吃可爱长大的小学妹 提交于 2019-12-30 14:44:11
问题 Already done a research but I don't find the right answer that fit my problem. error: htmlspecialchars() expects parameter 1 to be string, array given(create.blade) <div class="an-single-component with-shadow"> <div class="an-component-body"> @foreach($setting as $setfield) @if($setfield->type === 'smallInteger') <div class"form-group" style="padding:20px"> <div style="display:inline-block"> <P><input type="hidden" name="set_id[{{$setfield->code}}]" value="{{$setfield->id}}">{{$setfield-

How do I make automatic height row based on content in the maatwebsite version 3 laravel excel?

好久不见. 提交于 2019-12-29 09:31:56
问题 I had search reference and the reference say to try like this : <?php ... class ReportExport implements ShouldAutoSize, FromView, WithColumnFormatting, WithEvents { ... public function registerEvents(): array { return [ AfterSheet::class => function(AfterSheet $event) { ... $event->sheet->getDelegate()->getRowDimension(37)->setRowHeight(-1); $event->sheet->getDelegate()->getStyle('R37:Z37')->getAlignment()->setWrapText(true); }, ]; } } I try like that, but the result like this : Should the

Laravel 5.6 Reoccuring Error

ぃ、小莉子 提交于 2019-12-25 03:22:59
问题 I have an error that occurs no matter what the actual error is within Laravel 5.6 It just keeps saying Could not find resource 'views/layouts.html.php' in any resource paths.(searched: /var/www/{domain}/vendor/filp/whoops/src/Whoops/Handler/../Resources) for everything that causes an error and doesn't display the full debug page that Laravel usually displays. I'm not sure what caused this or what I could do to fix it besides reinstalling Laravel, which I'd highly prefer not to do. Does

How to run laravel5.6 applicationin phpdesktop app with SQLite Database

亡梦爱人 提交于 2019-12-25 00:47:10
问题 I am using Laravel 5.6 application with SQLite database. It is well running on XAMPP server but I want to use it on PHPDesktop App. when I keep all file on PHPDesktop App "WWW" derectory and run the phpdesktop-chrome.exe file the the given error is displaying. Parse error: syntax error, unexpected '?' in C:\Users\AN\Desktop\phpdeskto\www\core\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 242 来源: https://stackoverflow.com/questions/51744926/how-to-run-laravel5-6