Questions tagged as 'laravel'

1
answer

Something wrong with if in the controller Laravel

I have a function in a laravel controller, at first it seems to be working fine but when it goes through the "if" part it jumps straight to the "else", here is the code that is in the controller: //Inserção de troca(transicao) e decremento na t...
asked by 06.12.2018 / 18:41
1
answer

How to use forelse without error in form - LARAVEL?

Good afternoon, I have a form that it brings an array of the database through user_id, but it has a problem after I put the forelse it is not bringing all the data, because if it has more than one data it duplicates the form. I do not know if...
asked by 29.11.2018 / 17:56
1
answer

I can not make search work with eloquent and relationship !!! Laravel 5.5 and mysql

I am doing a search by taking a word part and playing in a search type LIKE for fields fields. I use Eloquent and relationships, but it does not bring the data. { $pesquisa = $dataForm['pesquisa']; $atestados = Atestad...
asked by 19.12.2018 / 12:07
2
answers

Popular JSON dynamically with PHP / Laravel

I'm working with Laravel on a client project where I want to build a tree structure with the users registered in the system, I found a script that does this, and for that it uses JSONs to get the data. The framework it works on is as follows:...
asked by 01.10.2018 / 20:07
2
answers

Error using many to many laravel

I have a group of Users that have Many To Many relationship, to create this relationship I made a beLongsToMany function within the Users model. But every time I call this function I get the following message:   Uncaught exception 'BadMethodC...
asked by 20.09.2018 / 20:10
1
answer

Table Relationship (Laravel API)

I am creating an API in PHP using Laravel, but I could not do the relationship between two tables.    User Table (LoginUsers) & Behaviors . I have already created the LoginUser and Behavior GET separately, but I would like when I make a us...
asked by 31.08.2018 / 20:01
1
answer

Filter records within a one-month interval

I have several items sold in a month and I would like to display only the items sold in the current month. Example: In September I had a total of 30 items sold, and in August, 20 items. How do I pick up the current date and check the quant...
asked by 04.09.2018 / 01:07
1
answer

Eloquent does not return the same results as SQL

I have this SQL code that when running directly in the database works fine, but I had to convert it to the laravel format. It performs but returns no results. Where am I going wrong? It seems that the problem is there in% w / o% of% w / o...
asked by 06.08.2018 / 14:35
1
answer

Error: Method Illuminate \ Database \ Eloquent \ Collection :: save does not exist

Good afternoon, guys. I'm developing an application that uses the laravel framework. I am having the below error while trying to save the checklist items. The error occurs in the second save () method of the register () method. Model: Checkl...
asked by 18.07.2018 / 15:56
1
answer

Redirection after login laravel 5.5

Good morning, I'm using Laravel's default authentication scafold, and reusing the structure by overwriting the methods I need to behave the way I want. I customized the default model, got it to authenticate and register, everything ok. Howeve...
asked by 13.07.2018 / 14:46