Questions tagged as 'laravel'

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
1
answer

How to configure Laravel 4 to automatically detect which environment I am in (production and development)?

In Laravel 4 , we have a configuration file in app/config/database.php . And in the app/config/local/database.php folder you have another file. The Laravel 4 has a mechanism to be able to detect in which environment w...
asked by 17.02.2016 / 12:51
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

Column not found: 1054 laravel

My code returns this error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'postagens.id' in 'where clause' (SQL: select * from 'postagens' where 'postagens'.'id' = 1 limit 1) follow my code here the controller: public function g...
asked by 12.11.2015 / 03:48
1
answer

Artisan Laravel not installed

I installed laravel with composer all working ... I use commands like laravel new projeto , but if I use a command like php artisan list it informs that the artisan command is not recognized ... How can I "install artisan"? Note:...
asked by 15.11.2015 / 01:08
2
answers

Relationship one to one Laravel

Good morning, I'm developing my first project in laravel, and I'm having a difficult relationship in two entities. I have my student registration, but I can not understand how to call coursefac through a dropdown in the student record....
asked by 20.10.2015 / 14:25
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
2
answers

select with datetime mssql

I'm trying to do a select in ms sql but I can not use datetime. $dataInicio = \DateTime::createFromFormat('d/m/Y', $input['data_inicio'])->format('Y-m-d'); $result = \DB::select('Select * from PESAGEM where cast(databruto as date) = ? and...
asked by 04.09.2015 / 15:28
1
answer

Make changes to a site developed in Laravel 4.2 [closed]

I'm starting the development in Laravel and I have to implement new features in a site developed in Laravel 4.2 and by another programmer. I need to create a function that adds rows to a Log style table, which needs to be accessible throughou...
asked by 13.10.2015 / 11:28