Questions tagged as 'laravel'

1
answer

Model Laravel 5.2

Good morning. I need to insert / update data from a table in my database, however I do not know the columns that can hold within that table, because the system is very flex. I created a modal with $fillable = ['*']; to try to update only...
asked by 15.12.2017 / 13:05
1
answer

Route and form in Laravel

I have a route Route::get('/','WebController@index'); I have a controller public function index() { $cars = Cars::table('cars')->get(); return view('web::index')->with('cars', $cars); } And in form it passes the fo...
asked by 08.12.2017 / 16:12
1
answer

Using count () in Laravel

I have controller that plays for my view the total number of courses registered in the portal. My doubts are due to the operation of the count() method. For example, output of both statements below are equivalent:...
asked by 07.11.2016 / 13:14
1
answer

Doubts about laravel; How does it execute this code?

I'm learning about Laravel and I was intrigued to know how a part of the framework code for Seeder works and the question is about the following code: public function run() { Categoria::insert(['nome'=>'Dúvidas'...
asked by 17.01.2018 / 18:21
1
answer

Doubt join with paginate laravel

How to mount eloquent the following query? SELECT * FROM nos.destinos d join nos.servidors s on (d.idservidor = s.idservidor) where s.servidor like '%nome%' My templates class Servidor extends Model { protected $primaryKey = 'idserv...
asked by 31.10.2017 / 18:58
2
answers

Inquiry Laravel Eloquent

How do I generate the query below with Eloquent , since Group By of error in Eloquent . SELECT otimibus_gps.positions.id, otimibus_gps.positions.deviceid, otimibus_gps.positions.devicetime, otimibus_gps.positions.lat...
asked by 25.09.2017 / 18:51
1
answer

How to open the modal bootstrap form after a validation error Laravel 5.4

I have a modal bootstrap contact form. I have the validations where they are validating correctly. Now my question is: How do I when not to pass the validation it return the message in modal with it open. When it validates and does not pass vali...
asked by 27.08.2017 / 01:23
1
answer

Sum of the multiplication of the quantity by value of the product in daily sales

I have a page of orders, we will take as base a mercantile, where the person buys 3 soft drinks each with the value of $ 6.00 and 2 cookies in the amount of $ 2.00 each. I first need to multiply these values (3 * 6) and (2 * 2) and then add th...
asked by 07.10.2017 / 19:11
1
answer

Redirect Route direct to the view

I've read in some places that the correct way is to point the route to a controller and then redirect to a view . I do this even when I will not pass any variables to this view ? In this case, I will have a "about us" page where you will...
asked by 09.10.2017 / 23:43
1
answer

Laravel 5.4 - Send email with attached txt

The case is simple: I need to generate a txt in Laravel based on Array and then attach this text file with Attachments through Mail :: to (!)     
asked by 03.09.2017 / 01:46