Questions tagged as 'laravel'

1
answer

Cors Laravel, release only for a specific domain

I'm using the LaravelCors library and would like to block all requesters except a specific Domain, how do I do this?     
asked by 05.02.2018 / 00:10
1
answer

Correct alternative that implements a validator for a date field in Laravel

a. $this->validate($request, [ 'data_nascimento' => 'regex:ddmmyyyy', ]); b. $this->validate($request, [ 'data_nascimento' => 'required|date', ]); c. $this->validate($request, [ 'data_nascimento' => 'dig...
asked by 01.11.2017 / 00:38
1
answer

Laravel 5.5: Get name of each table in select union

I need to make a select in two tables and join them with union , until then, but I need to also get the name of the two so I can identify it in View . > I have tried to use getTable() in each select , but it returns the e...
asked by 23.12.2017 / 22:37
2
answers

Laravel cron error does not execute

I have a cron that should be running every day in an hour. $ schedule-> command ('inspire') -> dailyAt ('15: 00 '); but it is not running Code <?php namespace App\Units; use Illuminate\Console\Scheduling\Schedule; use Illuminat...
asked by 30.10.2017 / 19:37
1
answer

More than one relationship with table top

I have an Accounts Receivable table that has a relationship with the Customer Table and TWO relationships with a Chart of Accounts table I searched the Eloquent documentation but did not find how I can do these two relationships with the sa...
asked by 17.11.2017 / 18:15
1
answer

How to conduct a double consultation on laravel?

I have a query in SQL Ansi: select * from payments as P, receipts as R where P.created_at < CURRENT_DATE AND P.updated_at < CURRENT_DATE AND R.created_at < CURRENT_DATE AND R.updated_at < CURRENT_DATE Precious to perform the sa...
asked by 24.10.2017 / 22:51
1
answer

How to configure email sending in Laravel within cron?

After the creation of cron (code below) a scan is made in the database behind altered data. I have to send an email with this data. How can I do this ??? cron code: <?php namespace App\Console\Commands; use Illuminate\Console\Command...
asked by 25.10.2017 / 16:42
1
answer

SQL: Avoid repeating row and sum values

I have this select: select DISTINCT (clients.name) as nomeempresa, payments.amount_paid as pagamento, receipts.original_amount as recebimento FROM payments, receipts, receipt_status, payment_status, clients WHERE pay...
asked by 30.10.2017 / 17:48
1
answer

Insert data into Oracle table "without returning id into"?

I'm using Laravel 5.2 and when I enter data it wants to return the last, but at the moment I want to insert and know if the operation was successful. My function in controller looks like this: public function cadastrar(), { $cod...
asked by 19.10.2017 / 20:16
1
answer

Clasture where in field type json no (Laravel + Eloquent)

The problem is the following, I have to bring from a select the permissions that a profile has, only the permissions are in a json field, and because if it is several permissions we have a data collection, I need to do this within a middleware:...
asked by 19.10.2017 / 23:28