Support the ongoing development of Laravel.io →
Cipa

Cipa

Joined 11 Dec 2017

Statistics

Threads 8
Replies 3
Solutions 0
Articles 0

help secure query with like

Hi, this query can be injected using this text 'a% ' (remove quotes) $courses = Course::select('id',...

Likes Replies

sync() with where on the intermediary table

Hi, When using sync() a query like this is generated: update `course_group_course` set `year` = ? wh...

Likes Replies

what is relation used for, examples

Hi, public function belongsToMany($related, $table = null, $foreignKey = null, $relatedKey = null, $...

Likes Replies

Change pivot column from id to email

Hi, For a model I need to use an email value instead of the user_id value Normaly you would do it li...

Likes Replies

filter data in hasMany using where and parent field value

Hi, Is it possible to filter the data returned by relationship using values in the parent class Prog...

Likes Replies
3 years ago

Eloquent hasMany with multiple foreign keys and where

I am interested in this as well. Any updates? Thank you

0 Likes
4 years ago

How do I integrate a custom sql into a model

Probably in my case is best to use CI to run the query $reports = $this->db->query($sql)->r...

0 Likes
4 years ago

count from 2 3 relations down

Something like this seems to work, not final though public function otherDistrictCountRelation() {...

0 Likes

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.