Support the ongoing development of Laravel.io →

4,597 Threads

Adding Data to database using Eloquent Model

Im new to laravel and i wish to add some data to my database, im following tutorial from lynda.com U...

0 Likes
3 Replies

How to check if a Foreign Key exists

In my migration code I have: if (Schema::hasTable('activity_log')) { Schema::table('activity...

0 Likes
8 Replies
Solved

Cannot override model factories default

I can't workout why I cannot override the values specified in my ModelFactory.php file, from within...

0 Likes
6 Replies

Is it possible to sort results by relation without a join?

Currently I am retrieving product results for a category like this: $products = $category->produc...

0 Likes
0 Replies

DB query builder with LEFT JOIN using a RAW expression

I would like to left join data from a many-to-many relationship. In my first attempt to solve the pr...

shikhar-kr liked this thread

1 Likes
0 Replies

[SOLVED]Adding Foreign Key :: Migrations

Before I start, I ask politely, that you forgive me as I struggle to put things into words. Sufferin...

0 Likes
2 Replies

remove null from laravel collection ,php array

Hello I need to remove null coming from database , after using this code $school_dropdowns = DB::tab...

0 Likes
1 Replies

Searching for newest data and oldest data from the DB.

How do i use Eloquent to search for newest and oldest records from the database.

0 Likes
4 Replies
posted 6 years ago

SUM numbers grouped by DATE. Gives groupBy() on string error

I am attempting to sum the values of the numbers in one of the columns in my table. I want these val...

0 Likes
0 Replies

DB::select with raw where

Hey, I'm having a hard time compiling the DB:: or preferably Eloquent code for a query that involves...

0 Likes
6 Replies
Solved
posted 10 years ago

Join working in SQL but not in Query Builder

I'm trying to find all records that exist in both listings and listings_queue tables. Laravel $count...

0 Likes
8 Replies

Saving Data from Laravel Form in Bootstrap Modal

Hi there i'm noob to laravel. I have some problem with form: originally from stackoverflow: http://s...

0 Likes
4 Replies

Can I add a where condition on the belongsToMany join?

Hi, having this relation public function programs() { return $this->belongsToMany...

0 Likes
0 Replies

How to get Image from MS SQL Server Database

How to get Image from MS SQL Server Database. Column DataType: Image ?

0 Likes
2 Replies

Change DB on fly when a user logged in

I am making a system where each user has a own db. so when user login then db should be change by ge...

0 Likes
1 Replies

Newbie: Trying to create a search function on laravel 5

I'm trying to make a search function with laravel 5 and it's not passing the results variable to the...

0 Likes
8 Replies
posted 6 years ago

SQLSTATE[42S02]: Base table or view not found: 1146 Table

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cruds.users' doesn't exist (SQL: select *...

0 Likes
2 Replies

How to develop a completely secure e-commerce website in Laravel?

I am fairly new to laravel. I have developed two small web app which doesn't require that much of at...

0 Likes
12 Replies

Use Eloquent to Query only master table

I use PostgreSQL with partitioning by one table. Here's my quesrtion. Is there any way to query ONLY...

0 Likes
0 Replies

MAX/GROUP BY Query

How would I do the following query using query builder? Preferably without using any raw sql :-) SEL...

janise liked this thread

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