I configured the following route in my route file:
Route::post('order/productsByCategory', ['uses'=>'OrderController@productsByCategory']);
How do I use it in my Ajax request?
$.ajax({
url: "",
type: 'POST',
dat...
Is it possible with laravel to generate a migration that changes multiple tables with the same prefix? for example: in tables pesquisas_187 and pesquisas_146 (tables that have the same fields)
Schema::table('pesquisas_', function...
I'm using Laravel 5.4 in an application, and a validator method gets an array .
This array can have the attributes:
[
'nome' => $request->nome,
'ddd' => $request->ddd,
'fone' => $request->fone
]
Or jus...
Is it possible to create aliases for the column names of a table in Laravel's Model? Example: I have a questao table with columns:
id
questao
disciplinas_id
serie_id
professor_id
It would be simpler if I could treat the columns by ot...
I need to create an array in the format:
//$arr = ['id' => 1, 'razao_social' => 'Teste'] // saida esperada
// iteração
foreach($prestadores as $prestador){
// logica separando apenas alguns prestadores
if ($cont($outro_sql) >...
I'm trying to make a multiple insert with Laravel 5.3 in a table as follows:
Form
{!! Form::open(['route' => 'demanda.store', 'class' => 'form']) !!}
<div class="form-group form-inline">
{!! Form::label('ano',...
I need to get only the month of a date that comes with a $request . But I do not know how to do it:
if ($request->parcelas > 1) {
$mes = $request->data_vencimento = date('m');
for($i = 0; $i <= $request->pa...
I know that with migration I can create the tables, but have some way to automate even the creation of the bank with migration to follow as base I use Laravel 5.2
I'm using Laravel 5.2 and I have a lot of doubts to tell the lines about my search. I need to return the number of products within Categorias and SubCategorias .
My relationships are as follows, in the Product table I have...
Hello, I'm having trouble inserting the data from the controller.
I am doing the activities of a House of Code Laravel book to learn and I needed to do this to update the registry of a tuple from the bank, I ended up using the following worka...