Support the ongoing development of Laravel.io →

4,603 Threads

posted 10 years ago

Database access in Laravel 5

On using the DB inside the controller I am getting an FatalErrorException stating class 'App/Http/Co...

0 Likes
4 Replies

Insert data from a relation using Eloquent

Hello All, Im new here and just would like to know if the below way is PROPER OR NOT(it works for me...

0 Likes
2 Replies
posted 10 years ago

SQL Statements to Eloquent

hi i want convert this sql to eloquent but i don't now SELECT companies.LVal18AFC, basket.qty, b...

0 Likes
2 Replies

Search and filtering with whereHas

I have 3 tables. Photo id area_id user_id description User id name Area id name I want to make a...

0 Likes
6 Replies

Laravel 4.2, Flysystem and Amazon S3 public file URL

I am uploading my images to S3 using Flysystem. In my database I keep only the file name (image.jpg)...

0 Likes
0 Replies

How to use this query in laravel

I'm converting roject from pure PHP to Laravel 4, and I have a problem with converting this query SE...

0 Likes
3 Replies
Solved

Form/Model binding not working

I'm in the process of getting to grips with L4 and I'm having issues with saving/retrieving/updating...

0 Likes
4 Replies
posted 10 years ago

firstOrCreate giving a foreign key constraint error

Hi, Having a problem with using firstOrCreate with my Eloquent model $progress = Progress::firstOrCr...

0 Likes
2 Replies
Solved

I don't know filters on Collections

Hi, guys. I have 2 connections to databases with this configuration: /app/config/database.php 'princ...

0 Likes
0 Replies

Is there a difference in Eloquent between hasOne & belongsTo when both keys are given?

If I fully specify the keys, is there a difference between hasOne and belongsTo relationships? Or if...

0 Likes
0 Replies

delete/alter data in model relationships

Hi, If I have something like this: $user = User::with('phones')->find(1); It gives me the user's...

0 Likes
1 Replies

Aggregate, Aggregate Roots and Repositories managent with Laravel

Hi, I was working with some Entities that may contain some other dependent Entities or Value Objects...

0 Likes
0 Replies

Eloquent hasManyThrough relation and with a little customization.

Parent, Child and Tag are three models. Parent (id, other fileds ....) Child (id, parent_id, tag_id...

0 Likes
1 Replies
posted 10 years ago

How to use Many 2 Many and a custom date?

Hey guys, When i use my model for Year, i can get all articles that are connected with the year tabl...

0 Likes
2 Replies

find($id) and whereId($id)

What is the diference between find($id) and whereId($id)?

0 Likes
1 Replies
Solved

Two functions in one

Trying to get my head around the logic for the following. I have 3 images and two static functions....

0 Likes
1 Replies

data doesn't deleted (ondelete in foreign key)

hi , i have a problem in my project so , when i delete my user his topics doesn't deleted ! and ther...

0 Likes
2 Replies
posted 10 years ago

Seed database with hash password

Hello, I have a table of users can you please tell me how I can update all the rows in the users tab...

0 Likes
1 Replies

PBKDF2 Encryption

Hi all, I need to create an application with authentication system that matches password from a Djan...

0 Likes
0 Replies
posted 10 years ago

Error Code 1215 Cannot add foreign key constraint

Hello I got this error even I do it correctly... [Illuminate\Database\QueryException] SQLSTATE[HY00...

0 Likes
0 Replies

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.