This question is a follow up this and this . But I'll try to make them independent.
I have the following tables, weathers :
+--------+-------+---------+
| id | temp | id_freg |
+--------+-------+---------+
| 337 | 12.36 |...
I have the following Tabelas/Models and I am not able to make a query:
Model 1
id | Name
---+---------------
1 | Model1.1
2 | Model1.2
3 | Model1.3
Model 2
id | Name | model1_id
---+----------+----------
1 | Mode...
I'm working on Laravel and I have 3 tables (users, administrations and real estate).
I would like to know, what would be the best way to relate (associate) users and properties belonging to the same administration?
What would be the best w...
I'm trying to list an association table, in my case it's the class table, which associates officials (teachers) and students.
I gave a good researched before posting this question but I could not solve the problem.
Role model
<?ph...
I'm having the following error when executing the command.
In Connection.php line 647:
SQLSTATE [HY000] [1049] Unknown database 'localhost' (SQL: select *
from information_schema.tables where table_schem a = localhost and
table_...
I am not able to group data for different days.
I have some communications registered and with the default Created_at and Updated_at
I would like to show these separate releases day by day ..
VIEW
@foreach($messages as $message)
<...
In the PHPStorm interface a warning message appears stating that I'm calling the orderBy method statically, but it is not static. My call:
Artigo::orderBy('edicao', 'desc')->paginate(25);
Would this be "wrong"? Or would have to do:
(ne...
I need to open a project previously made in laravel.
I've never worked with laravel, so I do not know where I might be going wrong.
The project came in a .zip file
when I unzipped it it created a folder called engraf182-my-project-6609a7d5...
I have a polymorphic m-m relationship in my bank where:
class (id, name)
student (id, name)
lesson (id, name)
classable (class_id, classable_id, classable_type)
A class has several students and several lessons.
a s...
I'm trying to use relationships to display data on the screen but I get the following error:
Trying to get property 'name' of non-object
In this command
$recebimento->planoconta()->get()->first()->nome
MODEL ACCOUNT...