Support the ongoing development of Laravel.io →

4,311 Threads

Different results from the MySQL console and DB::select(DB::raw()).

Here are my results (MySQL result is correct): http://laravel.io/bin/mG0bm I also tried to write thi...

0 Likes
2 Replies

laravel Many to Many relation

Can someone please help me. i want to know how can i get to opposite of a belongsToMany relationship...

0 Likes
2 Replies
posted 9 years ago

getRelations() returns blank

Hi, I'm trying to query a relationship for use with an accessor with getNameAttribute this is my cod...

0 Likes
1 Replies

How to make a data persist temporarily until approved by an Admin

Hi great minds! I am building an HR software and I will like to implement a special feature which is...

0 Likes
1 Replies

Inserting binary fields

Hey all, I've got an application that needs to run against both a MySQL and SQL Server database depe...

0 Likes
1 Replies

Error message can not open stream

I am trying to connect to a new class model that I set up. I am getting an error can't open stream,...

0 Likes
0 Replies
posted 8 years ago

compare houseprice with avg houseprice postal code.

I've two models House and Postalcode: <?php namespace App\Models; use Illuminate\Database\Eloq...

0 Likes
1 Replies

belongsToMany showing linked data along parent data

How would i go about showing data formatted nicely in json allowing the parent data and linked data...

0 Likes
1 Replies
Solved
posted 8 years ago

How to specify the field name to look for in hasone relationship

Hi, I have a table with: id employee_name manager_id In this table, manager id is a foreign key to i...

0 Likes
1 Replies

Results of a Relationship Return Null

I have the following code, and I can't seem to access it through the model relatioship object. Any i...

0 Likes
0 Replies

How to validate array that has only integer?

How to validate array like this below [2, 33, 24] the value should not be more than 30

0 Likes
1 Replies
posted 8 years ago

Class dont found

Hello, i'm newbie with laravel, I try learn it making some simple projeckt and I have little problem...

0 Likes
2 Replies

Insert Ignore/Replace queries?

I have a strange thing that is happening where I am getting duplicate key errors occasionally - most...

0 Likes
3 Replies
posted 8 years ago

Get all that have the same 'belongsTo' relationship

If I have a 'student' model and each student belongs to a 'teacher': class Student extends Model { p...

0 Likes
0 Replies
posted 8 years ago

Laravel 5.2: how to get Model properties in a Controller

Hello, How can I access a Model's properties in a Controller in Laravel? In my User model I have thi...

0 Likes
0 Replies
posted 10 years ago

SQL with special Parameter

Hi, how can I transcribe this sql select with Eloquent? SELECT * FROM player WHERE concat(YEAR(CURDA...

0 Likes
3 Replies
Solved

Max value on empty table returns Builder not Null

I'm trying to get the max value of a column in the database, so I'm using something like $maxVal = m...

0 Likes
4 Replies
Solved

mongodb not working

The documentation for https://github.com/jenssegers/laravel-mongodb doesn't go into much detail abou...

0 Likes
1 Replies
posted 8 years ago

Composite key

I have the following tables: Table: clients Schema::create('clients', function(Blueprint $table) {...

0 Likes
1 Replies

Reverse working with many to many polymorphic relations

Hi guys, I'm wondering how to deal with this situation: I have this structure: Ingredients (basic li...

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.