Support the ongoing development of Laravel.io →

4,312 Threads

Php Tinker Error

My directory structure is CBridge->app->Models->Companies In companies.php I have below cod...

0 Likes
0 Replies

Retrieve data from migration unsuccessfully

Hi. I am trying to retrieve data from a table called users. The data is not showing,though. How do I...

0 Likes
0 Replies

Laravel and AntiXSS: How to make AntiXSS as default behaviour of Blade?

Hi I am using Laravel 5.1 and vtalbot/markdown. I have a works table and inside there is description...

0 Likes
0 Replies
posted 9 years ago

One To Many & One To One in Same Relationship Lookup

Hey all. So, I am three tables that are interconnected. Character Has primary key profileId Characte...

0 Likes
0 Replies

User(admin) hasOne Group & User(normal) belongsTo Group solution

Dear reader, I am building a simple group chat application. The architecture is like this: User(Admi...

0 Likes
0 Replies

Eloquent : Guarded and Unguard Certain Collumn Temporarily

Hi All, it's me again, writing new thread to ask for some help.. i have a model, which i called &quo...

0 Likes
2 Replies
posted 9 years ago

Error using like and wildcard with sqlsvr driver

This throws a 500 server error. I don't even get a laravel error page. As soon as I pass in the % fo...

0 Likes
1 Replies

Subcategory Tree System

Hi there, I want to show subcategories in the system tree. But I could not. Can you help me in direc...

0 Likes
0 Replies
posted 9 years ago

Where clause on morphTo polymorphic relation?

I have set up a Polymorphic relationship as follows: class Charge extends Model { public functi...

0 Likes
0 Replies

Eloquent contains() method doesn't check on newly saved relations?

Suppose you have a many-to-many relation between two models, let's say Post and Tag, and you want to...

0 Likes
0 Replies

Best way to get logged users info for eloquent.

I've been using this: $query = $this->job->where('user_id', \Auth::user()->id)->get();...

0 Likes
0 Replies

Eloquent Drop Down does not show correct value from db

Hi I have a discount table that starts from 0-100. The second entry is 0.5. This is how is seed the...

0 Likes
2 Replies

Can't Create Foreign key using below tables

singers table <?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrati...

0 Likes
1 Replies

DB::getQueryLog() only getting select queries

Hello, I'm using the DB::getQueryLog() to create a logging page in my application but for some reaso...

0 Likes
0 Replies

Help with model building

Hi there, I get stuck at building the models and relationships for my app. I need: bond model user...

0 Likes
3 Replies
Solved

id as string?

ok so i have a country table with id, country e.g. UK => United Kingdom.. so id is a string...

0 Likes
3 Replies

Model->fill() should not typehint array, opinions?

Before I submit a PR for this, I am seeking opinions. I feel that the Model class (Illuminate\Databa...

0 Likes
0 Replies

Unit testing - mock eloquent's query scope method

I would like to mock model's scope method, is it possible? Here is the scenario: Order model: public...

0 Likes
3 Replies

Access first data of a many to many relationsheep with eloquent

Hello, I have two models Person class Person extends Model { public function emails()...

0 Likes
2 Replies
Solved
posted 9 years ago

sum() Returns 0 if Used with skip()

I have ran into a problem with regards to standalone Eloquent. I have a query like this: $data = Tes...

0 Likes
1 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.