mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-30 23:04:34 -04:00
* View composers * Saving client and contacts * saving client and contacts * update client job * unique emails
42 lines
729 B
PHP
42 lines
729 B
PHP
<?php
|
|
|
|
namespace App\Jobs\Client;
|
|
|
|
|
|
use App\Models\Client;
|
|
use App\Repositories\ClientRepository;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class UpdateClient
|
|
{
|
|
use Dispatchable;
|
|
|
|
protected $request;
|
|
|
|
protected $client;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
|
|
public function __construct(Request $request, Client $client)
|
|
{
|
|
$this->request = $request;
|
|
$this->client = $client;
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle(ClientRepository $clientRepo)
|
|
{
|
|
return $clientRepo->save($this->request, $this->client);
|
|
}
|
|
}
|