Questions tagged as 'laravel'

1
answer

How do I list all instanciable controllers in Laravel?

In Laravel 5, we have a folder called Http\Controllers which has the controllers used in the application. There is also a controller called Controller , which is abstract, that is, it is used only to be extended by other controll...
asked by 18.05.2016 / 16:29
1
answer

Sending form via Ajax in Laravel + Request

I have a registration form for people. I need to send it with Ajax to not reload the page. So far, I have the following ready that I followed for a tutorial. Sending Js. $("form#pessoasCadastrar" ).submit(function( event ) { event.p...
asked by 30.04.2016 / 16:56
2
answers

Save Related Models (One to One) - Laravel 5.1

I have a Model Info and a Model Complement that are listed one by one. The relationships are already working properly, I can pull the data and such, but I need to do an update and I do not know how. Currently I get all the data in r...
asked by 14.04.2016 / 16:01
1
answer

Using Eloquent hasManyThrough

// Modelo Cliente public function plano() { return $this->hasManyThrough('App\Plano', 'App\Plano_cliente','cliente_id','id','plano_id'); } //Modelo Plano public function cliente() { return $this->hasMan...
asked by 05.04.2016 / 18:09
2
answers

Creation of a website and a backend with PHP frameworks [closed]

I'm creating a website with a back-end system. I have always done this process using only a framework like Laravel or Codeigniter, but talking to some more experienced people on this subject, they recommended using Codeigniter or Laravel only...
asked by 22.03.2016 / 19:08
1
answer

What is the "url" option in the app / config / app.php configuration file

In Laravel 4 , we have a configuration file app/config/app.php . There is an option called url . Many times I've seen this option empty: 'url' => '', And also I've already tested put some url there: 'url' => 'ht...
asked by 18.04.2016 / 21:16
1
answer

How to escape a javascript variable for the Laravel blade?

Hello, I have this javascript function that gets a parameter: function teste(id){ document.getElementById("campo1").innerHTML = id; document.getElementById("campo2").innerHTML = {{app\User::find("id")->titulo}} } How do I get the Use...
asked by 24.02.2016 / 21:35
1
answer

Document root Apache 2 can not find laravel routes

Based on the assumption that we are on a linux server we have the following senary. the document root pointed to <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/laravel/public ServerName site.com.br hence w...
asked by 08.05.2016 / 16:02
1
answer

Eloquent giving 500 error with many results [closed]

I'm doing a query in my database with some LEFT JOIN and some WHERE clauses, however, I'm having a lot of difficulties regarding the return of this query, which, having many results, simply after a certain processing time gives 500 error For exa...
asked by 26.01.2016 / 16:20
1
answer

How to generate random names for images that are going to be uploaded?

I'm having trouble creating random names for my images.    I was having the md5 function (mt_rand (1,10000) but I did not succeed using it together with has :: file. public function anexar () { if(Input::hasFile('file')){...
asked by 16.03.2016 / 22:36