Questions tagged as 'laravel'

1
answer

char fields in a migration laravel

I am creating a migration in Laravel, and I have a field defined like this: $table->char('código', 3); The code data should be made up of three digits, from 000 to 999 , but I can not use a numeric field, because the leading...
asked by 30.11.2018 / 23:46
1
answer

Error with arrays - Undefined offset: 2 in Laravel PHP

I have a problem trying to save arrays in a table in my database. I have the code in this way in the store() function of my controller: try { foreach($request->horario as $id_horario=>$row){ foreach($row['check'] as $...
asked by 12.12.2018 / 20:30
2
answers

Laravel soft delete in pivot tables

I have a m-n relationship between two tables using a pivot table. In the migration of the pivot table, I created it with a deleted_at field, using the softDeletes() method, like this: public function up() { Schema::cre...
asked by 29.12.2018 / 14:31
1
answer

Is there a transaction log in Laravel?

I need to make a transaction log for the CRUD of the system. I know it can be done using triggers that trigger the action of saving the record in a transaction table but does Laravel have this functionality?     
asked by 14.11.2018 / 01:39
1
answer

laravel error 5.2 ReflectionException in Route.php line 286:

link I'll give you this repository in case you want to see the complete files I hope you can help me;) hello I hope you can help I have a project in which everything works correctly on my local server but when uploading it to a shared se...
asked by 20.11.2018 / 00:21
1
answer

How to run a cron job in laravel?

Develop a small module that basically sends a congratulatory email to users on their birthday, everything works fine but now I would like this email to be sent automatically every day at midnight, following a tutorial along with the documentatio...
asked by 21.11.2018 / 14:16
1
answer

Does anyone know how I can do this type of Eloquent query?

I need to have a query builder. The only way that has occurred to me is to make a string, and in the string form the eloquent query. I only have a problem executing the query. $variable = "where('a','asd')->get()"; return Modelo::$variable;...
asked by 21.11.2018 / 21:23
1
answer

How to do unit tests with phpUnit to the laravel drivers?

I still have a lot of doubt about doing unit tests to the drivers that I believe in laravel, for example: employeeController, where this has methods like index, store, edit, Does anyone know how to perform these tests on the controller's methods...
asked by 09.11.2018 / 04:01
1
answer

Doubt in laravel driver with php

I have a problem with the controller, I'm looking for a product and at the same time I'm looking for a product that I have related up to here I have no problem using this driver: public function show($id) { $producto = Pr...
asked by 16.11.2018 / 23:16
1
answer

Pass variable int to string

Sorry for the question I asked, but I tried to pass a numeric variable to a string, but it does not take results. For example, in my database I have a field called "plano" type varchar and I need to save it in this way 088, but when I print the...
asked by 16.11.2018 / 13:25