Questions tagged as 'laravel-5'

1
answer

How to test cron in laravel?

I've created a cron for sending emails every time. But how to test the operation? Code <?php namespace App\Console\Commands; namespace App\Console\Commands\EnvioEmailBlCron; use Illuminate\Console\Command; class envioEmailBIcron ext...
asked by 25.10.2017 / 21:06
1
answer

Class not found Laravel

Good afternoon, I'm starting with studies in laravel, the moment I joined Eloquent ORM I began to have problems. This is my controller. <?php namespace App\Http\Controllers; use Illuminate\Support\Facades\DB; use estoque\Produto; use Reque...
asked by 12.03.2017 / 21:55
2
answers

Specify columns in a relationship with Laravel

I have a relationship of User with Role . User::with('role')->get() In this case, User has the columns: id , name, role_id , created_at and updated_at . And Role has: id , name...
asked by 27.01.2017 / 10:18
2
answers

Trying to get property of non-object?

This is my View : <tbody> @if(isset($pessoas)) @foreach($pessoas as $p) <tr> <td>{{$p->nome}}</td> <td>{{$p->idade}}</td> &...
asked by 02.03.2017 / 14:40
2
answers

How to return a collection of objects in laravel via ajax?

I created this function in my Controller to return a list of employees in my ajax request, but it is not returning anything. public function getFuncionarios(Request $request){ if($info = Funcionario::where('id_empresa', $request->get('e...
asked by 01.08.2016 / 15:28
1
answer

Deploy Laravel project by Git

I need to deploy a Laravel project installed on a dev pc on a Linux server. After downloading everything via Git, some folders are ignored by .gitignore . How do I turn Composer to reinstall all dependencies? Do you have npm too?   ...
asked by 21.06.2016 / 00:03
4
answers

About Routes and Links

I made a crud, but I changed the organization of the files, instead of following the pattern, I created a user folder that contains the controller, route and model. I'd like help trying to figure out why I can not find the route through link_to_...
asked by 05.04.2016 / 16:54
1
answer

Create Postgres Numeric Field in Laravel 5.1

I need to create a field of type numeric existing in postgres using migrations of laravel, can someone tell me how to do it? I tried this but did not rotate: public function up() { Schema::create('complementos', function (Bluep...
asked by 14.04.2016 / 21:11
1
answer

Activate Mode Maintenance Laravel 5.1 Without Artisan

I know there is the php artisan down command to enable maintenance mode, but I have my application hosted and I do not know how to give this command. Would you have some other way to do that? Editing a file?     
asked by 04.02.2016 / 20:48
3
answers

Multiple INSERT Models Laravel 5

I'm developing a system and I came across the following situation: I need to insert the data first into the 'person' table, retrieve the last 'person_id', and then insert the data into the 'provider' table everything in the store method, lo...
asked by 25.05.2016 / 21:24