Questions tagged as 'laravel'

1
answer

Laravel Results of a Query Builder for eloquent model

I'm doing a query using Query Builder $users = DB::select( DB::raw(" SELECT users.* from users, permissions_customers WHERE permissions_customers.customer_id in ( SELECT permissions_customers.customer_id from permissions_customers WHER...
asked by 05.09.2014 / 14:50
1
answer

Check if Input :: file exists Laravel

I have a class created by me that uploads files. I would like to check if Input :: file ('image') exists, because if it does not exist, it does not upload the image. Follow my code: if(Input::has('name')){ $file = Input::file('imagem');...
asked by 13.05.2015 / 22:02
1
answer

Consultation in a relationship Many to Many in Laravel 4

Well, I'm "stuck" on a problem with a client report. I have the following relationship: Module (id, name) Associate (id, name, upper_id) Associates_Modules (modulo_id, associated_id, class, enrolled, attending, dropping) What I nee...
asked by 17.08.2014 / 00:38
1
answer

Doubt with relationship One to Many

I have two tables, produtos and categorias . In my view of produtos I want to show the category name of that product, not your code. Category Template Category.php namespace MagicCommerce\Site\Cadastros; class...
asked by 07.01.2014 / 22:19
1
answer

laravel Authentication 5.2

I'm trying to log in to laravel 5.2 but is not authenticating the user to the table. In the file auth.php I changed the validation table to login : 'guards' => [ 'web' => [ 'driver' => 'session',...
asked by 19.05.2016 / 04:24
1
answer

Difference between laravel new project and composer create-project commands

What is the difference between the laravel new nome-projeto and composer create-project laravel/laravel nome-projeto --prefer-dist ? In both cases the result is the same but in the case of the composer path, the project folder ta...
asked by 13.04.2016 / 13:36
1
answer

php artisan command serves by running multiple hosts

I am developing two applications, one that will be my front and another the backend, it happens that when I upload the applications to development laravel only enables one application, but it responds on both hosts. To get clearer, I'll expla...
asked by 30.05.2016 / 05:38
0
answers

Get information from an array inside a foreach - PHP

Good afternoon. I'm developing an application with PHP using Laravel, and I'm having a hard time. I have a table with the name of Account, in which it has the code of this account, represented by the variable $ client-> Code, also has the...
asked by 28.10.2017 / 17:55
2
answers

Conflict of encoding using Tinker and Laravel

I'm learning how to use Laravel and got caught in an encoding problem. I am trying to use tinker to insert data into my tables, and there I am getting the following error when I try to include a new post: Illuminate\Database\QueryException w...
asked by 09.10.2017 / 18:09
1
answer

Laravel and Json Web Token

I am having difficulty authenticating through the Json Web Token token (JWT) in the Laravel framework, I have been using the framework recently and have come across the following error. Whoops, looks like something went wrong. 1/1 ErrorEx...
asked by 01.12.2015 / 17:23