Remove Global Scope in boot method

Hello my friends, I have a problem that I want to solve but I can not figure out. First of all I would like to mention that I use Laravel 5....
05

Search multiple tables for a search term

Hi everyone, I have searched and can't find the answer anywhere. I have three tables (user, tracks, album). I want to search for a single k...
02

Issue with orderBy clause using with

I've an issue using this queries. Someone can help me? $i = Installation::where('company_id', Auth::user()->company_id);...
05

Count all participants of each registration type

I want to have a table in the view that shows all the registration types associated with a conference, the price of each one and the number of regi...
04

WhereHas showing error why?

I have Three Model- Sector, Codelist and Dsedata. Basis of this I have eloquent as below which works $datas=Sector::with(['codelists...
00

Return posts ranked by number of associated comments.

I have a Post model and a Comment model. I want to return the top ten posts ranked by the number of comments they have received. This is the...
05

many to many relationship with one unique table

Hi everybody! I am trying to wrap my head around a manyToMany relationship that I can't seem to get to work. I have already used these relat...
08

How to pass value bindings to B::raw() in order to avoid injection attacks?

This code is working great for me, but it receives external input values ($thread->id and $user_id), so I need to move...
01

Best practice for `with()` method

Hi, I would like to know if there are ramifications of optimal joins in terms of joining via the view or when fetching the model itself. So...
01

has not working in relationship query

My eloquent is as below return $codelists=Codelist::select('id','code','category')->with(['dsedatalast'=>function($query)use($...
06

Priya

Beauti Queen amazing kolkata escorts agency alwyas ready for you at your doorstep. Beauti Queen provide you high profile independent girl in kolkat...
01

Touching parent timestamp in a polymorphic relation

In this example below protected $touches = ['post']; is very helpful to update the parent's (Post's updated_at field) timestamp when...
03

Confused on eloquent relationship

Hi all, I'm confused on where to place the HasMany or BelongsTo in the model. I have a table named de...
01

Prevent from vector sql injections if using REGEXP for eloquent calls?

Hi, I'm not sure, if Laravel protects me from a SQL injection if using the following code snippet to search for whole words:...
00

How to organize this context? Two tables/models or just one?

I have a context of registrations at conferences. A registration has only one step if is a free registration. If is a paid registration there are t...
02

Cast attributes on DB::query()->from('view')

Hello, i want cast attributes return on DB::query()-from('view'), i have a view in database with jsonb columns, how i do it?...
03

attach many related models

I have a many-one relationship which is defined with a hasMany() function on one of the models and a belongsTo on the other. The "many&...
03

Method should not be called statically....

Can someone please put something to bed for me. I see this error message a lot: "Non-static method 'find' should not be called statical...
09

Last id returns nothing

Hi When i use the save() model on my model, i don't get the inserted id as return. It returns nothing. I use the default id column with auto...
10