mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
* Refactor pivot table accessors * Add select2 for client - country selector * Fixes for client contact update * implement ctrans() function across application * Increase custom fields to 4 across the application * Refactor: remove repos calling other repos, implement 4 custom values across application * include querying the custom values in the client list * Fix null custom value labels * Scaffold for client - show view * Working on Client Show
34 lines
620 B
PHP
34 lines
620 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();
|
|
|
|
return $client;
|
|
}
|
|
|
|
} |