Questions tagged as 'laravel'

1
answer

With creating a Request with namespace in Laravel

I tried to create a Request with a subnamespace in Laravel 5, but without success. When I run the command php artisan make:request Temp\OsRequest , instead of creating a file named OsRequest inside a Temp folder, a class ca...
asked by 23.05.2016 / 20:18
1
answer

Is it possible to customize the return of laravel validation when I use the Request?

When I use a post request and validate the data using the Request in Laravel 5.2 via ajax, the data is automatically returned to javascript. I would like to know if there is a way I can capture and customize this data the way I want it to return...
asked by 17.05.2016 / 22:45
1
answer

Laravel Much to Many?

I have this model public function exercicio() { return $this->belongsToMany(Exercicio::class); } and public function treino() { return $this->belongsToMany(Treino::class); } My Controller public function salvarTreino(Re...
asked by 15.10.2016 / 00:30
1
answer

Laravel 5.2 $ errors empty

I'm using Laravel 5.2 and I'm trying to create a validation for user registration. In UserController.php I have: public function postSignUp(Request $request){ $this->validate($request, [ 'email' => 'required|email|unique:u...
asked by 10.05.2016 / 20:15
1
answer

How to pass data searched by a view back to the view itself

I need to search a database through a view (Laravel Blade). The data obtained, stored in an array, need to display on the page itself called the database. I'm not getting the array return with such data, because I do not know how to handle the a...
asked by 13.05.2016 / 16:21
1
answer

Laravel - Test script errors to return certain status to AJAX

In an application in Laravel I have several scripts using ajax. All expect a response from the controller script and, if true, I run a certain function with ajax ' success ' Example of how I'm doing: script.js $.ajax({ type: 'GET',...
asked by 11.05.2016 / 17:04
1
answer

how to configure the eclipse IDE to fully read a laravel project 5

When you create a project with composer and import it into the eclipse workspace, some files do not appear like for example .env .gitignore or .json does anyone know how to configure eclipse to be able to write to them?     
asked by 10.01.2016 / 14:38
1
answer

Model, View and Controller "Multipurpose" - Laravel 5.1

Good morning, I have in my application 10 different tables, but it has the same structure ... id | nome | descricao . For each table I have in laravel the Model , the Controller and the Views of cadastre...
asked by 08.01.2016 / 13:02
2
answers

User Registration in Laravel

I'm starting with laravel about 2 weeks ago and it's automatically raining with doubts. I have a Registration form with the following button below: <button type="button" class="btn btn-primary" id="cadastrar-usuario"> <i class...
asked by 26.08.2016 / 16:49
2
answers

How can I execute this query with Laravel 5?

How would I run the following query in Laravel 5: SELECT *, (SELECT COUNT('anuncios'.'cat-id') FROM 'anuncios' WHERE 'anuncios'.'cat-id'='categoria'.'cat-id') AS 'cat-total' FROM 'categoria' ORDER BY 'cat-nome' ASC     
asked by 23.03.2016 / 03:44