Questions tagged as 'model'

1
answer

Can I use several requests in a laravel 5.3 mutators?

I try to save two input in database and I was thinking about doing it with mutators, the fact is that if I modify a field I only manage that value because the $ value that I receive is the one that sends the request, but I need to use something...
asked by 06.04.2018 / 16:29
1
answer

laravel 5.6 related models to related models

I have in the model Finca.php public function piscinas(){ return $this->hasMany(Piscina::class)->select('id' , 'finca_id', 'area' , 'name'); } And in the Piscina.php model public function finca(){ return $this->belong...
asked by 14.06.2018 / 00:48
1
answer

Angular $ scope model is not updated

I'm trying to do the following, a query to 2 apis. The first query is to bring the data of a given city, I use it with promises. The second query is, to bring from that data 7 more data given longitude, latitude and date, I made it using a...
asked by 09.11.2016 / 03:48
1
answer

create my table with "php artisan migrate" and then "php artisan make: auth" in the database I created the table

As you can see, I created the "user" table in the appropriate singular and I want it to stay that way and in this way do all the CRUD. but laravel has a convention. that is, I would like to keep my table in the singular, the model in the same wa...
asked by 24.08.2018 / 15:21
2
answers

Relations in laravel

Good, I have a view where I receive a "subject id", "student id" and I want to show the qualifications that ESE student has in ESA ASIGNATURA. I have the following function public function verCalificacion($id, $idasi) { $alumno = Alumn...
asked by 11.03.2017 / 05:21
0
answers

Laravel without using the Models?

I wanted to make the following query regarding the working mode of Laravel 5.5. Is it possible to work or develop a project with Laravel without using the Models, that is, only using the controllers to obtain and send the data to the views (u...
asked by 21.01.2018 / 16:25
0
answers

what do I have to change from the addtabelmodellistener so I can modify a list?

@Override public void addTableModelListener(TableModelListener l) { super.addTableModelListener(l); } I have a problem I have to occupy the addtablemodellistener to make an event and then modify data from a row of a table but I do not know...
asked by 25.04.2017 / 06:39
1
answer

Laravel 5.1 -Eager Loader gets me the last element of sub-fix

This is the code .. public function create() { $data = ComponenteFormacion::with(['campo_disciplinar']) ->get(); return $data; } I only get the last element of "field_disciplinary"...
asked by 15.03.2017 / 04:07
0
answers

Driver fails to call PHP model

How about, I'm a bit green in this, I was creating an api with php following the mvc model, I had managed to connect to the base using PDO, I did my controller std, my users ctrl, user model and my index, it works well with only one (users), but...
asked by 16.05.2017 / 03:29
1
answer

Save the text of a text box in a string

I am doing a program in QT in order to create a form and be able to save the information in a document. I have created my View for the form (where the user will enter the name), but now I do not know how to save what is written there in a String...
asked by 04.10.2018 / 14:56