mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
* Wired up Bulk Archive / Delete / Restore button with reactivity on checkbox actions * Working on POSTing bulk actions * Working on Filtering by status * Add Action Entity * Implement Vuex for state management * Implement Vuex storage & list view bulk actions * Clean up console logs
36 lines
699 B
PHP
36 lines
699 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\Client;
|
|
use App\Repositories\ClientContactRepository;
|
|
use Illuminate\Http\Request;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
class ClientRepository extends BaseRepository
|
|
{
|
|
protected $clientContactRepo;
|
|
|
|
public function __construct(ClientContactRepository $clientContactRepo)
|
|
{
|
|
$this->clientContactRepo = $clientContactRepo;
|
|
}
|
|
|
|
public function getClassName()
|
|
{
|
|
return Client::class;
|
|
}
|
|
|
|
public function save(Request $request, Client $client) : ?Client
|
|
{
|
|
$client->fill($request->input());
|
|
$client->save();
|
|
|
|
$this->clientContactRepo->save($request->input('contacts'), $client);
|
|
|
|
return $client;
|
|
}
|
|
|
|
} |