Questions tagged as 'laravel'

2
answers

how to pass parameter on the route from a controller in laravel?

I want to send a parameter in my route from my controller controller: public function guardarArticulo(Request $request){ $detalle_modelo = new DetalleModelo(); $detalle_modelo->idAutos = $request->idAutos; $d...
asked by 05.12.2017 / 17:54
2
answers

Laravel 5.5 Containers

In Laravel 5, when you create a model with resource controller and migration ( php artisan make:model Environment -mr ) you can notice that the methods are automatically generated in the controller. Now, if you look at each method creat...
asked by 04.12.2017 / 14:32
2
answers

Roles in laravel

I am working with laravel and I am in the roles and permissions stage of my application. In my table of users, add the one field called role. If role = 1 then he is an administrator if role = 2 then it is a normal user. I would like...
asked by 16.11.2017 / 01:30
0
answers

Laravel 5.2 returns associative array instead of Object in belongsTo

<?php namespace App; use Illuminate\Database\Eloquent\Model; class Categoria extends Model { protected $fillable=["descripcion","categoria_id"]; public function recurso_categorias(){ return $this->hasMany('App\RecursoCategoria'); }...
asked by 26.04.2016 / 05:46
1
answer

htmlentities () expects parameter 1 to be string, object given

I have a problem sending a query in a select it marks me the error htmlentities () expects parameter 1 to be string, object given My Controller is this: $works = ContractWork::get(); $year = DB:: table('contract_works')...
asked by 04.05.2016 / 02:40
1
answer

Login in laravel having a composite key

I have an application in laravel 5.1 with a composite key, most of the drivers worked fine, the problem is when I want to login it does not allow me to evaluate internally and does not allow having an array as the primary key ... there is some w...
asked by 14.05.2017 / 09:23
3
answers

Laravel 5.2 error when uploading it in hosting

I have a project done in laravel 5.2 with xampp on my local machine. When uploading it to a hosting, when I try to access the page, it returns an error that says it can not find the file (No such file or directory). From what I see in the messag...
asked by 01.06.2017 / 20:03
2
answers

Problem with destroy in laravel

I have a destroy method in my controller and I call it from a view to delete a record, but after confirming that I want to delete, the window remains blank and does not erase anything at all and does not redirect me to another view. The drive...
asked by 09.05.2018 / 02:52
1
answer

validate form with laravel

Hello, I am trying to validate the fields of the form that I created with the validate function of laravel, I pass valid data to it and it does not validate. $request->validate([ 'player' => 'alpha_dash', 'spec.*...
asked by 03.11.2017 / 08:12
1
answer

Session in Laravel

I have a question regarding the sessions that are due in Laravel, as they will know in the file session.php there is a variable called lifetime that there is configured the time in which you want a session to be alive. The issue that I do not...
asked by 20.10.2018 / 22:57