mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Update client.statement
route
This commit is contained in:
parent
792eb003e3
commit
c6bc102c6d
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Requests\Statements\CreateStatementRequest;
|
||||||
|
|
||||||
class ClientStatementController extends BaseController
|
class ClientStatementController extends BaseController
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -18,7 +20,7 @@ class ClientStatementController extends BaseController
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function statement()
|
public function statement(CreateStatementRequest $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
31
app/Http/Requests/Statements/CreateStatementRequest.php
Normal file
31
app/Http/Requests/Statements/CreateStatementRequest.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Statements;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class CreateStatementRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->isAdmin();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'start_date' => ['required'],
|
||||||
|
'end_date' => ['required'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -43,7 +43,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
|||||||
Route::post('connected_account', 'ConnectedAccountController@index');
|
Route::post('connected_account', 'ConnectedAccountController@index');
|
||||||
Route::post('connected_account/gmail', 'ConnectedAccountController@handleGmailOauth');
|
Route::post('connected_account/gmail', 'ConnectedAccountController@handleGmailOauth');
|
||||||
|
|
||||||
Route::resource('client_statement', 'ClientStatementController@statement'); // name = (client_statement. index / create / show / update / destroy / edit
|
Route::post('client_statement', 'ClientStatementController@statement')->name('client.statement');
|
||||||
|
|
||||||
Route::post('companies/purge/{company}', 'MigrationController@purgeCompany')->middleware('password_protected');
|
Route::post('companies/purge/{company}', 'MigrationController@purgeCompany')->middleware('password_protected');
|
||||||
Route::post('companies/purge_save_settings/{company}', 'MigrationController@purgeCompanySaveSettings')->middleware('password_protected');
|
Route::post('companies/purge_save_settings/{company}', 'MigrationController@purgeCompanySaveSettings')->middleware('password_protected');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user