Questions tagged as 'laravel-5'

1
answer

Single record with 2 fields verification - Laravel 5.1

I have a table with columns id , nome , descricao and tipo . In my Request I have: 'nome' => 'required|unique:edificacoes' So far so good, I can not register anything with the same name, but how would I n...
asked by 08.01.2016 / 18:00
2
answers

Access all settings of the .env file

Does anyone know how I can access all the data that is in the .env file? I need to bring all the data as an array, I have already used the helper function env (), without success, I need something like the example below. p> $dadosConn = [ 'driv...
asked by 26.02.2016 / 15:44
1
answer

Permissions Laravel 5 using Homestead

I'm using laravel 5 with a Homestead box using vagrant and virtualbox for this, as demonstrated in the framework documentation: Permission denied I ran the commands from my Homestead: sudo chmod 777 -R <projeto> but did not s...
asked by 25.10.2015 / 18:15
1
answer

Create fake relationship in model Laravel

I have a model for my posts table, it looks something like this: $post = Post::where('titulo_url', $titulo_url)->first(); //$post->id //$post->categoria_id //$post->titulo_url //$post->titulo //$post->texto As you may have...
asked by 21.10.2015 / 03:36
2
answers

How to list the routes in Laravel (Without using artisan)?

No Laravel 4 I know how to list all routes through the command line. Just do php artisan routes . But now, I have to do this in the source code of my application. That is, I need to list the routes (in foreach for examp...
asked by 17.02.2016 / 12:03
1
answer

Error while doing INSERT - Laravel 5.1 + PostgreSQL

I have date fields on my form, but these fields are optional. When I fill in a date the registration is successful, but if I leave the empty date field I get the following error: SQLSTATE[22007]: Invalid datetime format: 7 ERROR: invalid input...
asked by 18.12.2015 / 20:23
1
answer

Flash Session does not work, Laravel 5.1 [closed]

I've done this several times but for some reason now it's not working, I can not grab the flash from the session in the view UsersController: public function login_page(Request $request) { $title = "login"; $dataToView = array(...
asked by 10.12.2015 / 12:04
1
answer

Class Not Found in Laravel 5

I have this Controller in Laravel 5 . HomeController.php <?php namespace App\Http\Controllers; use View; use App\Portfolio; use App\Cliente; class HomeController extends Controller { public function getIndex(){...
asked by 24.08.2015 / 18:59
2
answers

Send data only to sidebar.blade.php

I need to set up a menu using the registered categories. How can I do this without using a view ? I have my layout.blade.php with a @include('sidebar') My query works on view categorias.blade.php , I just nee...
asked by 16.09.2015 / 18:56
1
answer

Laravel - The requested URL was not found on this server

What I did I made a form that registers the data in the database. Locally it worked perfectly. Problem It simply says that it is not matching the URL. It's strange because the error below says that public index.php was not found, and if...
asked by 06.05.2015 / 15:11