Questions tagged as 'laravel-eloquent'

1
answer

Lumen and Firebird Database

Is it possible to use Lumen and Eloquent in a Firebird database that is already used by another application, without ORM making changes to the database structure? Another detail: Is it possible to access only 10% of the tables without the ris...
asked by 25.07.2016 / 02:37
1
answer

How to get records from a table when there is no relationship with another table in Laravel?

In Laravel, when I want to get data from a table that contains some relationship, or when I want to get the data from a condition in a related table, for example, usuarios containing livros , I use the methods has or wher...
asked by 06.05.2016 / 22:50
1
answer

Migrations Laravel 5.4

I'm having trouble trying to run my migrations when I run:    php artisan migrate: refresh --seed The error below occurs: [Illuminate\Database\QueryException] SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot delete or upda...
asked by 19.06.2017 / 02:57
1
answer

Call to undefined method Illuminate \ Database \ Query \ Builder :: lists ()

I have a problem creating a list of types for my project, for some reason in others Controller worked perfectly but unfortunately not at this time. I'm doing the create method of my Controller public function create()...
asked by 29.09.2016 / 01:48
2
answers

Sort results by a relationship column in Laravel 4

I currently have some methods that I use together that allow me to make requests to my application controlling the "withs", "orders" and such via querystring. I can do, for example: GET /users?sort=name&sex=female In this case t...
asked by 27.06.2014 / 14:18
1
answer

Relationship in Laravel / Eloquent ORM

I have a problem. I need to return the values of a relationship, however, it has the following error: ErrorException Undefined property: Illuminate\Database\Eloquent\Collection::$fileServico My code: FileClass.php public function fileS...
asked by 05.06.2014 / 05:36
1
answer

How to create a cron in Laravel?

I have to create a Cron in Laravel to send emails every 24h. I must upload the email to the bank. So after a query in the database cron should send the email with the query data.     
asked by 24.10.2017 / 22:17
2
answers

List Tree Categories in Laravel 5.1

I'm starting with Laravel 5.1 and I'm a bit lost yet. I need to list categories, subcategories and "sub-subcategories". Table: Categorias ------------------------ id | int nome | varchar categoria_pai | int Data:...
asked by 11.08.2015 / 19:53
1
answer

Problem with wherein Eloquent Laravel

I need to run a query with the parameters as below: $questoes = Questao::leftJoin('capitulos_questoes', 'capitulos_questoes.questoes_id', '=', 'questoes.id') ->leftJoin('modulos_questoes', 'modulos_questoes.questoes_id', '=', 'q...
asked by 24.11.2016 / 14:40
2
answers

Laravel - Update all fields of a large table

I have the following problem ... I am migrating a system, and in the same I own a table of clients This table has a field called " cli_password ", which represents the client password To use Laravel authentication I had to create a " pa...
asked by 04.09.2014 / 22:16