Questions tagged as 'laravel'

1
answer

Reduced code for insert

Let's say you have the following fields in the users table:    ID , NOME , USUARIO , LOGIN and SENHA For me to insert a record into the table I do the following $usuario = new Usuario(); $usuario->nome...
asked by 23.05.2018 / 22:24
1
answer

How do I make an alert near the return date?

I'm developing a library system for an institution, but I'm having trouble alerting when the return date is near or leaving the fields in red when a student does not deliver the book on a given day. Controller <?php namespace App\Http...
asked by 15.03.2018 / 06:47
1
answer

Validation does not return array with errors

I'm trying to use laravel validation to validate a form, but I'm not getting the array of errors Controller use Illuminate\Http\Request; class Curriculos extends Controller { public function store(Request $request){ $this->validat...
asked by 31.07.2018 / 16:27
1
answer

Coverage of Unit Tests in Laravel

When starting a repository with a new Laravel 5.5 installation and configuring the test coverage and Coveralls for this, even though you have only done scaffolding of the framework authentication and have not written a single line of code, the r...
asked by 14.02.2018 / 17:31
1
answer

How to change the laravel relationship keyword

I have the following problem, I logged into a project where the database already existed and is in production, so all the foreign keys of this database are under the nomenclature fk_ and Eloquent of Laravel , related the% of%...
asked by 05.03.2018 / 18:06
1
answer

How to name pivot table Many-to-Many

How to name pivot tables in Laravel, so you do not need to name the table in the relationship method ( belongsToMany )? In the documentation I found this reference:    Many-to-many relationships are slightly more complicated than hasOne an...
asked by 05.02.2018 / 23:04
1
answer

Auth laravel authentication

Good morning, I decided to disable users, now I would like to know how I can allow user login only enabled, in table users I added a column called disable, if user disable is false allows login, if not redirects to the screen Login, I'll be wait...
asked by 20.02.2018 / 15:57
1
answer

Register password with Hash at Laravel bank

Hello everyone, I am not able to register the password with the hash in the database, I can register all the data but the password is not encrypted. public function CadastroSalvar (Request $request) { \App\Usuario::create($request->all(...
asked by 25.01.2018 / 17:43
1
answer

Comments Block - VSCode

There is something that can make it easier to create comment blocks in this format: /* |-------------------------------------------------------------------------- | Register Controller |--------------------------------------------------------...
asked by 09.03.2018 / 23:06
1
answer

Pass MySql query to Eloquent Laravel

I have a query that when passing to eloquent returns me a syntax error. SELECT order_id FROM timelines WHERE order_id NOT IN (SELECT order_id FROM timelines WHERE supplier_approved_id) AND supplier_id = 2 GROUP BY order_id Eloquent: Timel...
asked by 06.01.2018 / 18:53