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...
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...
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:...
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'...
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...
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...
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...
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...
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...