Questions tagged as 'laravel'

2
answers

error when relating by foreign key tables

I have an error when relating by foreign key, it generates the table but not the relation. I deleted the tables and I generated them again and nothing Use php artisan migrate link public function up() { Schema::create(...
asked by 17.08.2017 / 02:44
2
answers

Error updating a unique field

I have a problem updating the information in a role. In my database I have the attribute nombre_rol as unique . Registering a new role works perfectly, but when updating the same record, it gives me the error that the Role element i...
asked by 23.06.2017 / 06:48
2
answers

What does this portion of code mean in laravel?

Look at this line of laravel code on the internet, however I do not know in what form it is interpreted. The line is as follows: $oldCart = Session::has('cart') ? Session::get('cart') : null; I would appreciate your explanation.     
asked by 13.06.2017 / 22:41
2
answers

How the methods of the Route class work in laravel

I have this route but I can not understand most of them and I already read the documentation but I was left with the doubts: Route::namespace('Admin') ->prefix('admin') ->name('admin.') ->middleware(['auth', 'admin'])...
asked by 06.12.2018 / 05:03
1
answer

Login / registration form with Laravel 5

I have a login form and a registration form and the problem is with the email. If I do not add the email type in the validation rules: 'email' => 'required|unique:users,email', and without wanting to register an email with spaces at the...
asked by 24.05.2017 / 15:15
2
answers

How to combine an associative array with another associative array in Laravel? Problem with collections

I am testing the collections, and I have 2 doubts, the first is when I have arrived at the method where I am having problems when using LIKE. Given this collection $coleccion = collection( [ ['vehiculo' => 'toyo...
asked by 25.05.2017 / 10:47
2
answers

Delete an item from a Collection

I have a Collection that comes to me from the route. This Collection has a relation, detalle , which is where I want to eliminate one of the objects that arrive, exactly the "qdet_ref" => "300_1_2" . At another time...
asked by 07.03.2018 / 12:59
1
answer

Apply filter in related tables laravel

Laravel's version is 5.4 Here I put the link of the project to download (Includes database to import, this in App / filtros_laravel.sql) link I will give a description of the problem. Let's start with the tables first. create table cl...
asked by 02.06.2017 / 05:22
1
answer

I can not install the Laravel package.js in Node JS

My intention is to install the package that Laravel has in Node.js. This is the content of my package.js file: { "private": true, "scripts": { "dev": "gulp watch", "prod": "gulp --production" }, "devDependencies": { "...
asked by 04.07.2017 / 05:19
1
answer

Tsvector of postgres in Laravel 5.3

I need to create a tsvector field ( link ) of postgres in my table > Documents I already searched in several places how to do it but I can not find it. Schema::create('documentos', function (Blueprint $table) { $table->increments(...
asked by 23.07.2017 / 04:13