Questions tagged as 'laravel-5'

2
answers

Laravel - Use OR within where

I am using the ->cont command to count the return number, and for this I put a condition using ->WHERE , but when I try to put a || in the condition it will look for the answer. p> code I'm using: $numrow1=DB::table...
asked by 12.07.2018 / 15:34
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

TokenMismatchException after any ajax error in Laravel 5.1

I'm working with Laravel a short time and I'm having a problem when I use ajax requests. When my application returns any error and I try to send one more request, Laravel sends me this error: TokenMismatchException in VerifyCsrfToken.php line...
asked by 07.01.2016 / 11:57
2
answers

Retrieving value in the pivot table as the property of a part of the relationship

I have the manyToMany relationship between Grupos and Usuarios and a pivot table grupo_usuario that stores the keys and an extra aprovador , Boolean field, which serves to indicate if the user in the relationship can...
asked by 05.08.2015 / 01:04
1
answer

How to list the records of a certain employee with Laravel?

Hello, I happen to be taking my first steps on Laravel. I created a database with two tables (dependents and employees), created the crud of each and display the entire system in html (bootstrap). The problem is that I am not able to create a pa...
asked by 28.09.2016 / 20:22
2
answers

Send parameter from one route to another

I want to send a variable from one route to another, to display this variable in the view, use example: public function create(ExamRequest $request) { Exam::create( $request->all() ); $message = 'A avaliação "'.$request->input('n...
asked by 09.01.2017 / 18:35
1
answer

Catch specific columns with Laravel querybuilder

Consider that my table in the DB has many columns. But for a specific query I do not need all of them.  How would I do it in Laravel (using both Eloquent and QueryBuilder to get just the columns I need?     
asked by 28.03.2016 / 14:51
2
answers

Dependent register taking ID of the respective employee with laravel 5.2

My problem is that when registering a new dependent the input, which has the ID of the employee to which the dependent will be related, is automatically filled with the given user ID and not that the person who is registering must enter the id o...
asked by 06.10.2016 / 18:05
1
answer

How to Order Related Model Data?

I have the following relationship in my application: Template Customer : class Cliente extends Model { protected $table = 'clientes'; public function Usuario(){ return $this->hasMany('App\Models\Admin\Usuario', 'id_cli...
asked by 18.04.2016 / 15:54
1
answer

How to consume authenticated API in Laravel with VueJS?

I need to consume an API with VueJs in Laravel 5.2, but is it authenticated, any tips for this process?     
asked by 07.07.2016 / 21:48