squibby squibby
9

Migrations broken after updating from Laravel 5.7 to 5.8

Hi - I am upgrading from Laravel 5.7 to 5.8. So far everything great except now when migrating to run my test to check everything is working I have an error... Illum...
Laravel
9
2048
IvanRadojevic IvanRadojevic
23

How to insert values of total_price 0 for last 30 days if is not created_at?

Illuminate\Support\Collection {#328 ▼ #items: array:3 [▼ 0 => {#331 ▼ +"DATE(created_at)": "2020-03-16" +"total_...
Laravel
23
128
auflyer2 auflyer2
5

Extending User Model

I'm working on a project with the standard Laravel setup with a users table and User model. Where I'm getting stuck is a User can be an Athlete or a Coach (or neither). A...
mcbates mcbates
3

How to use new DateSerialize in Laravel 7 as default?

I would like use Laravel's new serialization in Laravel 7 (7.4.2 in my case). In the docs it only desc...
saadaan saadaan
7

Database calls more efficient at blade view or controller?

Hi, I have a 28 rows x 11 columns table, for which I have to calculate the COUNT values from the database. I am pulling the rows through controller and traversing th...
TuffRivers TuffRivers
0

Events -> Listeners vs Handler

I am created an event, UserCreated, which will fire a welcome email. Ive seen a few different tutorials, some say create and event and a listener, then the listener will tr...
TuffRivers TuffRivers
2

Can i add a laravel Policy to my Route?

Currently i have a default policy that applies to a majority of my models, and i have the authorize within each controller action like sho public functio...
tareq55 tareq55
2

delete empty array from collection

Hello everyone, I have a problem which is that I have a array and in this array also a sub array I want to delete the sub-array that do not contain any values instead of th...
Alodon Alodon
21

How can I delete old image while updating the post with new image

public function update(Request $request, $id) { // $this->validate($request, [ 'title'=> 'required', 'category_id' => 'required...
Laravel
21
168
ramonpego ramonpego
2

Homestead wrong mapping

hi guys i'm start using homestead now but some sites aren't working properly i have this sites: folders: - map: ~/PhpstormPr...
sergionc sergionc
3

delete record with fetch api

I am trying to delete a record using fetch api but I get the following error: The GET method is not supported for this route. Supported methods: DELETE. button:...
longestdrive longestdrive
0

Getting started with Laravel-Mix. Basics and complexity

Hi I've been trying to get to grips with Laravel Mix to bring an older app up to date and refactor the front end. I've had mixed success but each time I get m...
Mix
0
3
noblemfd noblemfd
3

Multiple DB charset in Laravel config database

In my Laravel-5.8 application I got this error: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4...
palla451 palla451
5

Confusion about Redis and Laravel

I followed the laravel documentation database.php 'redis' => [ 'client' => env('REDIS_CLIENT', 'predis'), 'options' => [...

API First / Keep REST API in sync between client and server

I'm looking for best practices, here's the situation: Backend REST API: Laravel Frontend: Ionic Angular Two different teams developing e...
IvanRadojevic IvanRadojevic
0

The map method

I have 3 arrays. I want to map and add 27 arrays with price = 0. How to correct map "date" => $dates? [ { "some_day": "20...
Jonjie Jonjie
15

How to save item that has items inside using eloquent

Hi guys, hope you're doing good and safe :) I'm just thinking how do you guys save this kind of setup using eloquent. I have a main table called product...
Eloquent
15
105
LiamA LiamA
2

Using default factory property value for other properties within a factory

Say that I use a factory to create a model that has 2 properties: $factory->define(MyModel::class, function (Faker $faker) { return [ 'property1' => $faker->...
penipeni penipeni
0

Jobs start again after completion

I use horizon and redis driver for queues. I have 40k rows in database to process (calculate prices and update row in database), so I run 40 jobs (1000 records per job). Ea...
MarlonV MarlonV
3

compare value and preform an action

Hey guys, i'am struggling for hours with a piece of code. i want to update some records based on status. DD of $data gives me: array:1 [▼ "st...
mybsides mybsides
0

Pass multiple of the same card to default Nova dashboard

Is it possible to pass multiples of the same card in the NovaServiceProvider if the card constructor accepts parameters that would produce different metric values per card?...
Nova
0
4
dhunpael dhunpael
3

::find only returns first entry

so, i've been trying to get only one db entry. For some reason laravel only returns my top entry in the database. Does anyone know what i'm doing wrong? Code:...
BilalHaidar BilalHaidar
0

How Laravel-mix handles css?

Hi, I am trying to understand how Laravel-mix handles css when using a Vue.js app with Laravel. For instance, how laravel-mix decides on the file to hold all capture...
Mix
0
16
david19 david19
2

Fetch a view via config file

Hello Team, Its possible render a view via config file? I get a error. myconfig.php <?php use Illuminate\Support\Facades\View; return [ 'v...
bngaard bngaard
3

Beginner: What is the best way to get data from multiple tables without duplication

Hi, I am fairly (few days old) in the world of Laravel, so I need some guidance as I do not quite understand the how to use the model and Controllers quite yet....
Yannick Yannick
1

Sort on properties of 2 different foreign keys in Laravel

I've got a users table where some of the users are teammembers. They used to have a property called start and end. These properties contained an i...
IvanRadojevic IvanRadojevic
2

SQL function to show 0.

My $orders collection looks like this: Is it available SQL function to show me total_price = 0 for the dates that I not have orders? In this case, I should have 27 dates wi...
asadsajjad asadsajjad
5

Getting array index to delete

I am trying to get the index from the array but cant get it loaded. Below is my controller. I want to delete the index from the array. Any help ? @foreach (j...
JAAulde JAAulde
0

Get `LoggerInterface` instance in Laravel >=5.6 (replacement for `Log::getMonolog()`)?

I am using a 3rd party library that provides a constructor which expects an instance of Psr\Log\LoggerInterface. The constructor in that code looks like:...
snipesnipes snipesnipes
0

resquest by seconds

Hello , is Laravel able to give something good for an API of about 1700 resquests/seconds ... as I think its max is 609 right ? if not what do you suggest? Also it seem tha...
Sandeepvemuri Sandeepvemuri
1

SMTP port25

Hi guys, I am using mailgun services to test mails. Right now I am using port 587 and it is working fine, instead of in need port 25. I am using SQLite for my databa...
eludic eludic
1

Laravel Rule Engine

One of the requirements of my new project is to design predefined rule engine in Laravel which will help decide the flow of the application. A simple example would be somet...
afghany afghany
2

laravel echo not listen on Presence Channels with pusher

i am broadcast on Presence Channel but it's not working with laravel-echo but i got the api message on pusher but i can't got it with laravel echo at client side and it's w...
Laravel
2
259
dan3460 dan3460
0

Github synchronizing between local and production sites

I posted this on the github forum but i have not gotten any answers, maybe one of you know the answer. With all the caos going around our company quickly had to branch out...
Create a New Discussion Button