invoiceninja/app/Jobs/Client/StoreClient.php
David Bomba c72e1f0139
Client Creation (#2533)
* Working on Oauth

* splitting out JS files

* Working on oAuth

*  working on oAuth

* minor fixes

* create client

* create client

* create client

* Working on adding a client
2018-12-02 21:42:06 +11:00

42 lines
738 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 StoreClient
{
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) : ?Client
{
return $clientRepo->save($this->request, $this->client);
}
}