Danven Danven
10

Different result in array depending on the server?

LARAVEL 5.8 BLADE {{ $person->cars()->pluck('cars.id') }} LOCAL MACHINE (PHP 7.3.7 ): [1,2,3,4]...
Laravel
10
134
RafaelMunoznl RafaelMunoznl
10

Different variables behaviour in localhost vs deployed

In my application I need to make globally available four variables: $user, $employee, $role and $company In order to show different menu options and lan...
Laravel
10
102
Abdullah_Iftikhar Abdullah_Iftikhar
9

How to check the Auth in controller constructor in laravel 5.8 or above

I have facing Auth::user()->role is null in the constructor. I have used it but its not working $this->middleware(function ($request, $next) { $this->...
mehmetanbaki mehmetanbaki
9

Adding JSON from EXCEL

Hey Laravelers I wanna adding data dynamically from excel to database with JSON which means adding the columns dynamically even if it's not existing. I'm usin...
Laravel
9
1120
smanes smanes
9

Trouble with Carbon in 5.8

I upgraded an application from 5.4 to 5.8. But I'm getting errors when I try to write to the database. The errors appear to be coming from Carbon: Data mis...
mehmetanbaki mehmetanbaki
9

Dynamic Data

Importing excel sheet with dynamic data: I have this issue SQLSTATE[HY000]: General error: 1364 Field 'CustomerName' doesn't have a default value (SQ...
Laravel
9
699
thorbym thorbym
9

phpmyadmin with Artisan Serve

Hi everyone. I am dipping in and dipping out of a home project at the moment, and it's been a while... forgive any stupid questions. I am serving my app local...
oli_d111 oli_d111
9

updateOrCreate - Ajax only trying to create

Hi All I'm trying to update a record using Ajax and being new to Ajax & laravel i'm confused about the result of the query. I'm trying to update a record but whe...
siewlon6093 siewlon6093
9

how to fetch login user and insert details to login user

the following code shows all the users from database but i want only the logged in user and save to him <div class="col-md-6 {{ $erro...
Laravel
9
170
tigerjun tigerjun
9

Sum column and join other table

I have two table. One is stock & product. Inside stock have product_id. The code below is correctly for count the total of the column stock quantity in table stock. But...
Timmypro Timmypro
9

Delete Button

I just completed my CRUD application in laravel 5.5. Everything seems to work perfectly aside the delete button. For instance, if I try to delete a record with an ID of 2,...
Laravel
9
102
vkronlein vkronlein
9

Querying On Relation Column Within a Relationship

I have a SupplierThread model that has a statuses relationship like so: /** * Supplier threads have many statuses. * * @return \...
FelixINX FelixINX
9

Database performance improvement: searching through 500,000+ rows

Hi, I have a job that takes quite some time (near or more...
Tips
9
96
SupunSam SupunSam
9

How to filter retrieved data from relational tables

Hi All, I am retrieving data from a relational data table from the database as follows: $job_records = JobRecord::with('job:job_id,status,mfg_site,tot...
Atef95 Atef95
8

Add click event inside sweet alert

I'm struggling with adding an event for my checkbox input inside a sweet alert modal this is my code.. swal.fire({ type: 'info', title: 'Atte...
Vue
8
89
digitlimit digitlimit
8

Bug in Laravel 6 validator?

I think there is a bug in Laravel 6 validator Kindly help me make sense of this: I wish to validate a certain unid, see my rules below Test1...
Laravel
8
110
naveedali naveedali
8

How to avoid duplication of code

Hi, I want to develop following apps: A Web App (Backend - Laravel, Front-end - React / Vue) A Mobile App (on react native) - using Lumen...
Laravel
8
107

getting different results in phpMyAdmin AND laravel with same query

I copy and paste the query from laravel to phpmyadmin and I get a different result, obviously it is the same database. why is this happening? I have this code:...
Laravel
8
102
AntLusher AntLusher
8

Lara Nova

Good morning all! Please could you help with the following: I have a JSON field called name with keys as follows: first, last, title. On the index page...
farshadf farshadf
8

simple test in laravel in create method

i want to simply test my model to see if it can be created or not here is what i tried : public function it_test_insert_model(){ // $this->acti...
Create a New Discussion Button