Questions tagged as 'laravel'

1
answer

Insert Many To Many Laravel 5.4

I have a situation as follows. I have 4 tables users - > department - > category_department - > category - > postings Where in my view I have a select where it shows a data relation about ex department: Thisinformationalreadycome...
asked by 12.09.2017 / 01:12
2
answers

Laravel 5.4: List information from 4 tables related to the WITH clause

As you can see in the controller , I am listing the information for each agreement, along with information that is in other tables (phones, address ), to list the specialty and type of service of each. Unlike the phones and address tabl...
asked by 02.08.2017 / 21:52
1
answer

Many to many relationship with select multiple in Laravel

I have Post and Tag models with a many to many relationship. When registering a post the previously registered tags usually appear in the select and I can save in the database. In the form of editing I am not able to make the selected and availa...
asked by 28.07.2017 / 00:18
1
answer

Update with Addition and Subtraction Laravel?

I'm starting to learn how to use Framework Laravel 5.4 so I'm doing a personal finance system and I have a Conta table with the field ( Saldo ); I would like to make a Credit or Debit transaction that will Subtract o...
asked by 31.08.2017 / 04:41
1
answer

Register on more than one table with Laravel

So I have 3 tables (doctors, addresses and phones), first I insert into the table doctors using the store method that gets in its own controller, and I get the id created for it and insert into the other tables along with the other information. F...
asked by 02.07.2017 / 01:38
1
answer

How do I store 2 SQL queries in a single variable?

Good afternoon guys, I'm trying to do 2 queries in my application and I want them both to be stored in a single variable, how can I do it? If so, how do I do it? Query 1: $usuarios = DB::table('users') ->join('user_municipios', 'user...
asked by 26.06.2017 / 19:41
1
answer

How to filter a list using the same parameter with two different values?

I'm implementing a motion filter where you can choose the parameter on which the filter should be based (for example: Date, Species, User) and choose any of these parameters, the value of it in a list (with database values). The point is th...
asked by 21.06.2017 / 19:52
1
answer

Problems when listing related table data in Laravel 5.3?

I'm working with php, laravel 5.3 and myql. After creating everything (Migration, model, controller, View, relationship), is giving me the following error:    ErrorException in 1d01653e0e29121ce444ef5c2072fb4d52e5e7db.php line 12:   Trying to...
asked by 29.07.2017 / 02:40
1
answer

Relationships Laravel OneToOne? [duplicate]

I am doing some exercises, but there is one where I can not understand why it is not working when I make another name in the method. I have a method in Model Location , where it does relationships of OneToOne . When I cal...
asked by 16.08.2017 / 21:29
1
answer

Laravel 5.4 - Show all phones of each result

I have the table convenios and telefones , each convenio has 1 or several telefones and a screen where all convenios are listed, I need to have all the phones related to each agreement. I can not search the p...
asked by 15.07.2017 / 15:30