Questions tagged as 'laravel-5'

0
answers

Limit relation by common attribute

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...
asked by 18.04.2018 / 12:53
0
answers

Large error 5.6 "Undefined property"

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...
asked by 10.04.2018 / 06:51
1
answer

How is the view.blade.php that loads the data for a carousel bootstrap?

I'm trying to load the data dynamically from a mySql database, into a carousel bootstrap, with laravel 5.3. The following is happening: The data is loaded, but the carousel does not work, that is, it stays static, with one image over the other....
asked by 07.04.2018 / 01:31
2
answers

Delete array element

I have a form with 60 input textbox with name numero [], of these 60 numbers I can only select a quantity x (quantity can be variable); how do I do when the user unchecks the checkbox the number is removed from the array? var i = 0, sel...
asked by 27.03.2018 / 12:48
1
answer

How to make Foreign Keys using Migrations Laravel

I'm trying to relate one field to another using migrations this way:    Butwhendoingtheforeignkeyinmigrationsthisway:MigrationPermission:Schema::create('permissions',function(Blueprint$table){$table->increments('id');$table->index('use...
asked by 13.03.2018 / 21:09
1
answer

How to use the Where in the consultation in laravel

How can I make a query below with mysql in laravel: SELECT gps.positions.id, gps.positions.protocol, gps.positions.deviceid, gps.positions.servertime, gps.positions.devicetime, gps.positions.fixtime, gps.positions.v...
asked by 21.03.2018 / 17:46
1
answer

Laravel Defender Trying to get property 'name' of non-object

You are returning the following error from my assignment:    $user->attachRole(12); Note : If I use this way, I have parameterized the normal functional defender model $user->roles()->attach(12); What can it be? If...
asked by 08.03.2018 / 19:46
0
answers

Consuming api with validation

Next, my método is working correctly, but I would like to do a validation if I can not succeed, letting the user know that I could not adicionarConta() have any way I can do this? Webservice method addConta(conta: ContaInter...
asked by 09.03.2018 / 20:31
1
answer

Create client_secret manually in PHP for Laravel + OAUTH2

Problem: I have an application with auto installer. When the user sets up their account, I would like to manually register it in the oauth_clients table, with a secret only from it. If I do the manual procedure through the Laravel Passport...
asked by 13.03.2018 / 18:25
0
answers

bash: create-project: command not found

Good evening, I'm not the smartest guy on linux. I use Laravel and have always created projects with the command    $ composer create-project -prefer-dist laravel / laravel project-name But today I decided to follow a tutorial on the web...
asked by 01.03.2018 / 02:17