Questions tagged as 'laravel-5'

2
answers

PHP Artisan migrate: Class Schema not found

I am studying Laravel 5.4 and I have the following problem: When performing a migration, in the console of Windows I execute the command: php artisan migrate When executing this command, it shows me the following error:...
asked by 04.05.2017 / 23:40
2
answers

Help with this error SQLSTATE [23000]: Integrity constraint violation: 1452 Can not add or update to child row: a foreign key constraint fails

Good I am trying to fill two tables of related data bases in Laravel using ajax one of books use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateLibrosTable extends Migration { /** * Run th...
asked by 06.01.2017 / 00:44
4
answers

Random data in Blade / Laravel 5.1

I want to generate random data in my views, specifically I want to go through the results of a query and each one assign a different color, all this in my views of Blade (Laravel) . Something like this (similar to what I want to do): $ar...
asked by 12.11.2016 / 03:05
1
answer

How to keep data in my session during all requests in Laravel 5.1?

Greetings, what I need is to keep some data sent from a form in an array that I store in Session de laravel, I'm doing it in the following way: In the routes.php I have: Route::bind('evento', function($slug){ return Deportes\Even...
asked by 07.07.2017 / 13:27
1
answer

Doubt to create a ModelFactory Laravel 5.3

Knowing that I have 3 tables: people (id, name, surname) $factory->define(SIMante\Personas::class, function ($faker) { return [ 'nombres' => $faker->firstName, 'apellidos' => $faker->lastName, ]; });...
asked by 22.11.2016 / 05:03
1
answer

Problems with accents Laravel 5 server

I have this: <html lang="es"> <meta charset="utf-8"> also in config/database I have 'charset' => 'utf8' . Still I have problems with the accents. In the local DB tests the problem is working with the DB of...
asked by 19.10.2016 / 21:10
2
answers

Difference between @yield and @include in Blade de Laravel

Hello people wanted to know if there is any technical difference, in principle and for the function that I give them, they would be working the same. It seems clearer to use @include . but I would like to know if there are any details t...
asked by 23.09.2016 / 17:39
1
answer

This error is generated by the seed "You requested 1 items but there are only 0 items in the collection"

I'm trying to make a seed with Laravel 5.1 and the problem is that it generates the data from the users table, but from the other 2 it does not. My codes are as follows. ModelFactory $factory->define(Blog\User::class, function (Faker\G...
asked by 23.09.2016 / 05:45
2
answers

When an error occurs creating the user the list of errors is not displayed

Something is wrong with the registration of new users. Here I have an attempt to create a user in which I have incorrectly entered the password confirmation. That should return me to the creator of the new user with a message in red indica...
asked by 22.02.2018 / 21:20
1
answer

count results from the controller

With the following code I have to search in a BD = payments and if 'payment_date' is equal to today I will show it in the view. And according to what I found, I added an accountant. If you found 2 results the value of the variable $ varnum = 2....
asked by 07.09.2016 / 23:43