Questions tagged as 'laravel-eloquent'

0
answers

Connection refused laravel

When I send my form, after processing the data in the laravel save method the following error occurs: QueryException in Connection.php line 769: SQLSTATE[HY000] [2002] Connection refused (SQL: insert into 'users' () values ()) What is the s...
asked by 28.11.2016 / 05:46
1
answer

Laravel does not return BelongsTo

Oops I have two tables one with a Product name and one with a ProductName name. When I make the relationships in models, only the ProductCategory object returns the products, the Product object does not return the category. class ProdutoCateg...
asked by 13.07.2016 / 03:50
0
answers

AJAX with Slim Frame

Project: link I have a problem with the AJAX request (resources / views / templates / app.twig) ajax - app.twig $('.stars-default').click(function(e) { e.preventDefault(); $.ajax({ url: '../app/Controllers/Poll.php',...
asked by 31.05.2016 / 01:42
0
answers

Laravel 5 (Eloquent) JOIN between two queries, is it possible?

The following SQL performs two queries and "adds" the hard answers "sideways": select * from (select id,name from client where id = 20) as a join (select id,age from client where id = 20) as b ON a.id = b.id I wonder if it's possibl...
asked by 15.04.2016 / 21:40
0
answers

How to construct an Object with an Array inside, using Eloquent Laravel

Hello everyone, I need to build a array as follows for a plugin: var data = [{ "label": "Follows", "color": "#aad874", "data": [ ["Seg", 50], ["Ter", 84], ["Qua", 52], ["Qui", 88], ["S...
asked by 07.02.2016 / 04:02
2
answers

Dynamic Combobox with jQuery + Laravel

I am on a sign-up screen where there is a combobox of State and Cities. City must be populated after state is selected. I have create.blade.php <div class="form-group"> {!! Form::label('estado', 'Estado:') !!} {!! F...
asked by 10.06.2015 / 16:38
1
answer

I have a problem where I really do not know how to make an event that listens to an action in Laravel

I have a slide show of images where the images registered in the bank appear. The table is called events . In this table there is a field called data_fim , which would refer to the end of the event date, and I also have a field called status...
asked by 24.09.2017 / 00:48
1
answer

Add multidimensional array as an array item

I'm working with laravel and I'm implementing a menu based on permissions, I'm retrieving menu data from a table in my database. I created a model and in it I'm doing the logic to retrieve the menu items and if the item has a parent_id column wi...
asked by 11.12.2017 / 18:39
2
answers

How to create a progress bar in PHP using the Laravel Framework?

Kindly, someone can help me. I need to create a progress bar for a PHP application using the Laravel framework. Example: When loading (displaying the DB list) a table with three thousand records displaying the status in a progress bar.     
asked by 09.07.2018 / 15:03
3
answers

Register user with Laravel

I am putting together an application, where an employee is registered, and this employee belongs to a company, which comes from the users table. When I do the registration process, the following error message appears: "SQLSTATE[HY000]: Gene...
asked by 03.07.2018 / 20:55