Tagged Questions
0
votes
1answer
27 views
Searching for a variable number of terms in a MySQL database using Laravel Fluent
I have the following MySQL table:
cases
id INT
diagnosis TEXT
description TEXT
This is represented in Laravel by a LibraryCase model.
When a user enters a search term I get ...
0
votes
1answer
33 views
Group related product attributes
I have a products table:
products
-id
-name
-image
And a product_atts table:
product_attributes
-product_id (FK)
-size (1, 2)
-memebership (1, 2, 3, 4, 6, 11)
-price
Now, when querying the ...
-5
votes
0answers
49 views
How can i display data from 3 different database tables? (like facebook news feed) [closed]
i am building a site (social network) where people can upload photos, post question, post a link etc.. I have a model and a table in the database for each kind of post. Every table has different ...
0
votes
1answer
45 views
Performing a Groupwise Maximum in Laravel 4
What's the best way to perform a groupwise maximum using Laravel's Eloquent ORM such that it returns instances of models?
0
votes
1answer
96 views
Laravel 4 Eloquent/Model Relationships
I am setting up several Models an want to know the correct approach to table structure and Model relationships.
Let's assume we have a shop containing products, each with properties size and color.
...
0
votes
2answers
39 views
How can I select tags from MySQL sorted by creation_date and name but remove duplicate name?
I'm using MySQL and Laravel 3.
I have the following table:
tags
id INT
name INT
created_at TIMESTAMP
tag names are not unique and tags are associated with another table called ...
0
votes
1answer
39 views
laravel4 CSV help in routing
I have a button and when I click that button the data should be opened in csv format
public function get_textfile() {
$table = Campaign::all();
$file = fopen('file.csv', ...
0
votes
1answer
27 views
how to embed video in laravel code
I am working on a project in which I store youtube video links in a database and then I retrieve those links and using blade template engine i try to embed them into page. I use a loop to put videos ...
0
votes
1answer
35 views
field constant using laravel query builder
Using laravel/fluent query builder, I'm trying to cause a constant field value to pass through for a union(ed) selection that is subsequently ordered . I haven't found the recipe to do the following ...
0
votes
1answer
46 views
Storing hashed keys: CHAR(64) as datatype in Laravel 4?
I'm fetching objects from a Webservice. Each object comes with a key with a format like:
...
2
votes
1answer
67 views
Eloquent ORM Movie Location
I am using Laravel 4 and eloquent orm to build a movie session database.
Now I have the following Models.
class Location extends \Eloquent
{
public $timestamps = false;
public $table = ...
1
vote
2answers
124 views
Foreign keys in Laravel 4 migrations issue
I've just created a new Laravel 4 project and am finding strange things happening with the foreign key aspect of the schema builder. If I use the ->foreign() method in any of my migrations I get ...
1
vote
1answer
51 views
Laravel 4 Migrations throwing 1072 error
I have a couple of migrations in a new Laravel 4 project. One is for regions and the other for areas. Each region has a number of areas, and areas belong to regions.
I have used Laravel 4 and the ...
1
vote
1answer
69 views
How to do this query with Laravel query builder
I'm trying to run this query in Laravel, and would like to do it with the query builder, so I can use the paginate() method. But I can't seem to figure out how to get this subquery going.
The raw ...
0
votes
1answer
93 views
Complicated query using eloquent - Laravel 4
So I am making a web site for an simulated hockey league.
I am trying to make the standings and this is where it gets complicated.
There is 2 conferences. East and West.
In each conference, there ...