Questions tagged as 'laravel'

2
answers

Error: SQLSTATE [42000]

I have the following error when executing php artisan migrate I'm using Lumen 5.6    In Connection.php line 664:                                                                                                                     ...
asked by 26.04.2018 / 23:58
2
answers

Error when extracting data from a relationship with laravel

I have 2 tables users and roles , I'm trying with laravel to get the name of the role which my user owns, this is my Model of roles class Role extends Model { protected $table = 'roles'; public function user(){...
asked by 17.05.2018 / 22:24
1
answer

Is there anything similar to full text searches in laravel?

I intend to show any row that contains at least one of the searched words, and in case of coinciding in several, that orders it from higher to lower number of coincidences. I have found information about the Like wildcard with laravel, but I...
asked by 01.04.2018 / 06:44
1
answer

protect my routes - print my Json

I am trying to avoid printing my Json format directly (or I do not know if there is any other way) What happens is that when I access my route in this way http://blissre.test/projects/ I upload my projects So far so good, when l...
asked by 31.03.2018 / 02:37
4
answers

Many-to-many relationship in Laravel

I have this structure user role_user roles I have the entity User, roles.The entity role_user NO, because it is not "necessary" When you create the migration for the role_user table, add some additional fields to it, for example, startdateR...
asked by 23.03.2018 / 20:18
1
answer

Does not enter the driver

I have the following route Route::resource('mail', 'MailController'); Which I call in the following form: @extends('layouts.app') @section('content') <div class="content"> <div class="row"> @if (Sessio...
asked by 11.03.2018 / 23:28
1
answer

Laravel / Lumen - Serialize an object

Good I have 2 models in my Lumen project, one is Cars and the other Users, the relationship that I have defined is that 1 user can have N Cars User Model <?php namespace App; use Illuminate\Auth\Authenticatable; use Laravel\Lumen\Auth\...
asked by 20.02.2018 / 13:05
2
answers

problem when relating to the ORM eloquent de laravel

I am working on an application in laravel 5.5 that works with tabs (personal data) and I have the respective table I also have a table communes that is related to the tabs table is to say a one-to-one relationship a tab can have a commune, I hav...
asked by 28.02.2018 / 20:59
1
answer

Compare date with Carbon in Laravel

I want to implement a logic in my laravel backend using the date of a publication. The example is as follows: A user creates an article, this contains title, content, image, user owner and date of publication, it turns out that the user pu...
asked by 21.07.2017 / 23:26
1
answer

Error creating a table by _token

I have a User table and an Entry table, which is for a user to buy an entry to visit a botanical garden. Ticket data: Schema::create('entradas', function (Blueprint $table){ $table->increments('id'); $table->da...
asked by 18.02.2018 / 16:18