potentdevelopment potentdevelopment
5

Eager Loading Multiple Relationships Error Thrown

Hello, I am trying to eager load multiple relationships and run a where clause on it here is my code: $menu_group = MenuGroup::with([ 'groupItem...
reinventingrich reinventingrich
1

How to get this eloquent query to return a builder object

So I have a model with a few hasMany() relationships and I as is normal It returns fine with a collection, since Eloquent rides on top of builder can I get it to return a b...
moukbel moukbel
5

asset() work with localhost , not with domain.local

hi, I add a virtual host to my project myproject.local the asset() doesn't work <img src="{{ asset('/icons/1.png') }}" alt...
krishna9720 krishna9720
2

Stripe Error Must provide source or customer laravel and Stripe token response null

Hi experts, I integrate stripe payment gateway to my laravel application Below is the code snippets. ProductController.php public funct...

How to write code in laracast?

I want to write code that cleanly. So nice views. How can I do that?...
Assistance
68
2250
JoeDawson JoeDawson
4

Using whereHas to return results where ALL relations match?

Hello, I currently have the following query: $recipes = Recipe::latest()->whereHas('ingredients', function(Builder $query) {...
me10071990 me10071990
12

If condition is not working

I have many column and applied for file and image(featured) it's working but not for title and content public function store(Request $req...
Laravel
12
159
thebigk thebigk
1

GroupBy and Chunk - How do I go about it?

I've an intermediate table that maintains the performances of the students in the tests. The table structure is as follows - user_id | test_id | question_id...
mada72 mada72
6

user- delivery address - many to many

Hello, I have user-delivery address a relation many-to-many I want to get delivery address in my order but I don't know what the last address is(no last in my DB)...
3Nd_R1m 3Nd_R1m
4

Internationalizing URL while keeping routes name

Good day, I was wondering if I could translates URL in Laravel. Here's what I mean: Given a ressources routes named "Dogs", the URL would appear as follow:...
lukegalea16 lukegalea16
12

Call controller function from another controller

Knowing that calling a controller function from another function is not good practice for Laravel, I tried adding a service which can be used to call another function from...
Laravel
12
138
wyatt44 wyatt44
4

Testing Registration

Hello Everyone! I am writing a test to check that invalid data posted to the register endpoint fails validation. I am trying to assert that the response is a redirec...
trevorpan trevorpan
4

Forge: script for adding column to production database table

Was reading this post below and feel I have a good understanding of the process of creating a new migration which then adds a column to an existing table. I know I'll have...
Forge
4
46
jay_gorio jay_gorio
11

Flatten laravel nested relationship (parent to descendants)

I have a parent children relationship on my model. What I want is to flatten all those collection including all those descendants of parent. [ { 'na...
Laravel
11
109
moukbel moukbel
2

Changing Variables.scss not working !

hi, i start a new project and Im trying to change some variables, what seems is nothing working $body-bg: red; i have sure install node_mud...
codebullet codebullet
3

firstOrCreate on multiple related records from XML feed

Hi all please I need help saving multiple records from XML Feed I am using Rodenastyle/stream-parser to receive the data, I can do updateOrCreate the records My chal...
dannisi1985 dannisi1985
1

Update parent data

I know the right way to update a parent data is using events. But I do 'this.$parent.data = newdata' it still works and I was expecting some errors to show in the browser c...
Vue
1
32
ahoi ahoi
7

Set radio-button value by bool in array

I'd like to solve the following problem: I got a data structure like that: { "options": [ { "id": 1, "title...
Vue
7
84
AnthonyFuller AnthonyFuller
2

PayPal

I would like to try Laracasts for a month but I don't see the option to pay with PayPal. I have saw...
tobyreed tobyreed
6

Submit form

Hello, Is there a quicker way to submit a form without having to use the function 'type' every time I want to type into an input field?...
Eco012390 Eco012390
3

Laravel Echo Private Channel for guest user how?

How do I setup a Laravel private channel for guests? Laravel Echo Echo.private('ticket.1') channels.php Broadcast::ch...
Laravel
3
205
JamesFreeman JamesFreeman
5

Mocking 3rd Party Classes within Singleton

I'm looking to test that TwitterOAuth is initiated with the correct config information, I have attached the code I have at the moment. Is it possible to depend...
finchy70 finchy70
0

Vue Select: How do I mark an option as selected dependant on id?

I pass the current id of an object via props (id_check) and loop through an array of objects to populate a select dropdown. I cant pre select the object with the same id a...
Vue
0
23
Nael.Saeed Nael.Saeed
11

Form Request Validation for JSON Parameter

Hi there, I have an AJAX request sent to my API. This request has a parameter that should contain a JSON formatted data. I want to validate that it is actually JSON....
Laravel
11
118
popcone popcone
3

Laravel and Vue

I'm building a large application using laravel and vue. My question is should we include all vue files under 'resources' folder of laravel? Or should I keep frontend and ba...
Vue
3
53
COACHTHEM COACHTHEM
0

ES6 features like arrow function, Array.from() not working after compiling js files with LaravelMix.

ES6 features like arrow function, Array.from() not working after compiling js files. I get this error in IE browser SCRIPT438: Object doesn't support property...
kiasaty kiasaty
0

Database Notification Error on Lumen while sending notifications

Hi. I'm trying to send notifications on Lumen when a new Offering (Model) is created. I added below packages and followed instructions on Laravel documentations:...
Lumen
0
10
INsanityDesign INsanityDesign
0

Q: BroadcastException - Fail gracefully

Hi I got a question regarding failing gracefully in the case the pusher server ist not running. Right now, if the websocket serve is running all...
ihorvorotnov ihorvorotnov
4

Upload a file to a model ID subdir

Hi everyone! I’m creating Exercises in Nova and use native File and Image fields to handle uploads. However, I...
Nova
4
89
MattB MattB
0

updating table column based on paypal package return

Currently, I'm using the Paypal package from srmklive which almost entirely working except I would like it to update a specific column in my database when it returns with t...
jasonb jasonb
10

can I access current user data in blade?

I want to access the user data, name for instance in my header.blade.php if the user is logged in. What is the simple solution? I know I am asking basic questions bu...
General
10
13629
mada72 mada72
2

get address in order

Hello, I try to get de user address in my order Controller $address = Address::where('id', '=', Auth::user()->address_id)->get();...
Phunzor Phunzor
3

[Homestead] Only showing contents of last site in yaml

So after buying a new PC, I've installed the most recent Homestead box, which goes fine. Nasty thing tho is that it only serves the contents of the last mapped site in home...

Dynamic custom fields: JSON, Pivot, morphToMany?

Hello everybody, I'm currently working on a "custom fields" feature for my Laravel-app. What it's supposed to do Each CustomField...
Create a New Discussion Button