laravel-5.6

Laravel Notification (Database Notification) Icon doesn't change

假装没事ソ 提交于 2019-12-24 06:47:17
问题 Hello everyone I tried to make a real time notification for admin user to get notification if there's a push event from github. I already make a notification table and get notified the problem is the notification icon is not changing and put 1++ when there's new notification and I need to refresh the page first to make the icon change. This is my controller. public function index(Request $request){ view()->share('page_sub', 'Webhhook'); $data = Cache::store('file')->get('repo'); // dd($data);

Vuejs Axios data not showing

天大地大妈咪最大 提交于 2019-12-24 05:54:47
问题 The problem of not showing information is delayed in fetching , i need any help for this problem. <h1>@{{message}}</h1> <div class="panel panel-primary"> <div class="panel-heading"> <div class="row"> <div class="col-md-10"><h3 class="panel-title">Experience</h3></div> <div class="col-md-2 text-right"> <button class="btn btn-success">Ajouter</button> </div> </div> </div> <div class="panel-body" > <ul class="list-group"> <li class="list-group-item" v-for="experience in experiences" > <div class

Laravel updateOrCreate on OneToOne relationShip

。_饼干妹妹 提交于 2019-12-24 05:22:10
问题 in my web application i have this models: InstagramAccount.php UserPageFeed.php each InstagramAccount has one record into UserPageFeed and each UserPageFeed belongs to one record into InstagramAccount, then that's one to one relationship, PROBLEM: my below code couldn't update existing row on table and create again $userSelectedPage = InstagramAccount::whereUsername('my_page')->first(); $userPageFeeds = new UserPageFeed(); $userSelectedPage->account()->updateOrCreate([ 'instagram_account_id'

php artisan migrate command error : could not find driver

和自甴很熟 提交于 2019-12-23 21:18:40
问题 My os is windows Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = blog and table_name = migrations) at E:\Programme\Laravel Lab\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead

Custom marker over google map

牧云@^-^@ 提交于 2019-12-23 12:31:08
问题 Issue Details Default icon is showing and I am expecting a custom icon for marker. Am I missing anything in below code? I am using Laravel 5.6.12 and vue.js and trying to show custom icon in google map. My code is below in template. <template> <div> <gmap-map :center="center" :zoom="12" style="width:100%; height: 400px;"> <gmap-marker :key="index" v-for="(m, index) in markers" :position="m.position"> </gmap-marker> </gmap-map> </div> </template> JS Code <script> export default { data() {

Ubuntu - Laravel 5.6 - Unable to load ffprobe (using php-ffmpeg)

落花浮王杯 提交于 2019-12-23 02:46:08
问题 I have ffmpeg and ffprobe installed on my ubuntu system (can access it via command line) ffmpeg and ffprobe are located in /usr/bin/ I installed these via composer "php-ffmpeg/binary-driver": "dev-master", "php-ffmpeg/php-ffmpeg": "^0.11.1", I've done: use FFMpeg; // in index() function// $ffmpeg = FFMpeg\FFMpeg::create([ 'ffmpeg.binaries' => '/usr/bin/ffmpeg', 'ffprobe.binaries' => '/usr/bin/ffprobe' ]); and still get FFMpeg \ Exception \ ExecutableNotFoundException Unable to load FFProbe I

How can I change color a character laravel excel maatwebsite?

陌路散爱 提交于 2019-12-22 10:06:56
问题 I get tutorial from here : https://laravel-excel.maatwebsite.nl/3.0/exports/extending.html So I use version 3 My excel like this : I want to change it to be like this : So I want the character England change to red color and bold I try like this : namespace App\Exports; ... use Maatwebsite\Excel\Concerns\WithEvents; use Maatwebsite\Excel\Events\BeforeExport; use Maatwebsite\Excel\Events\AfterSheet; class SummaryExport implements FromView, WithEvents { ... public function registerEvents():

whereJsonContains Laravel 5.6 not working?

微笑、不失礼 提交于 2019-12-21 23:04:25
问题 $rosters = EventRosters::where('event_id', $event_id) ->whereJsonContains('players', $user_id) ->whereNull('deleted_at') ->get(); The eloquent query above seems to only work when there is a single item in the 'players' json array. The data stored in the database looks as follows: [1] vs ["1","2"] Is there a reason the whereJsonContains is only working when it sees [1] in the db but not when it sees ["1","2"] ? I am pretty new to Laravel and have been struggling with this one a bit. 回答1: The

Laravel Nova - Map database json column to field

久未见 提交于 2019-12-20 04:24:11
问题 I have a database model with json column type called attributes . This column will contain additional details of the model. For example: attributes : {'desc' : 'test', 'width' : '500'} . I would like to display individual attribute ( desc & width ) in attributes column as a html field in Laravel admin resource. I checked supported field types and doesn't seem supports. Any suggestions how I can do this? 回答1: I'm not sure if it's the recommended answer but i've found a way that should work for

How can I set text align right in the column on the laravel Excel maatwebsite?

♀尐吖头ヾ 提交于 2019-12-18 09:38:39
问题 I get reference from here : https://laravel-excel.maatwebsite.nl/3.0/getting-started/ I have been looking for how to set the text align right, but I did not find it in the documentation My script export like this : <?php namespace App\Exports; use Maatwebsite\Excel\Concerns\Exportable; use Illuminate\Contracts\View\View; use Maatwebsite\Excel\Concerns\FromView; class InvoiceExport implements FromView { use Exportable; public function view(): View { $data = Invoice::get(); return view('exports