Compare commits
No commits in common. "07852aa72b0ebff509cf1514249fa262eac14498" and "708b0cf3866400c32a45c25563b2ab8c7352196f" have entirely different histories.
07852aa72b
...
708b0cf386
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Console;
|
namespace App\Console;
|
||||||
|
|
||||||
|
use App\Initialize\Actions\InitializeAction;
|
||||||
use App\Initialize\InitializeMembers;
|
use App\Initialize\InitializeMembers;
|
||||||
use App\Invoice\Actions\InvoiceSendAction;
|
use App\Invoice\Actions\InvoiceSendAction;
|
||||||
use Illuminate\Console\Scheduling\Schedule;
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
|
@ -17,6 +18,7 @@ class Kernel extends ConsoleKernel
|
||||||
*/
|
*/
|
||||||
protected $commands = [
|
protected $commands = [
|
||||||
InvoiceSendAction::class,
|
InvoiceSendAction::class,
|
||||||
|
InitializeAction::class,
|
||||||
InitializeMembers::class,
|
InitializeMembers::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,14 @@ use App\Setting\NamiSettings;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Lorisleiva\Actions\ActionRequest;
|
use Lorisleiva\Actions\ActionRequest;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
use Zoomyboy\LaravelNami\Nami;
|
||||||
|
|
||||||
class InitializeAction
|
class InitializeAction
|
||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $commandSignature = 'initialize {--mglnr=} {--password=} {--group=}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array<int, class-string>
|
* @var array<int, class-string>
|
||||||
*/
|
*/
|
||||||
|
@ -71,6 +74,8 @@ class InitializeAction
|
||||||
|
|
||||||
public function asController(ActionRequest $request, NamiSettings $settings): RedirectResponse
|
public function asController(ActionRequest $request, NamiSettings $settings): RedirectResponse
|
||||||
{
|
{
|
||||||
|
$api = Nami::freshLogin($request->input('mglnr'), $request->input('password'));
|
||||||
|
|
||||||
$settings->mglnr = (int) $request->input('mglnr');
|
$settings->mglnr = (int) $request->input('mglnr');
|
||||||
$settings->password = $request->input('password');
|
$settings->password = $request->input('password');
|
||||||
$settings->default_group_id = (int) $request->input('group_id');
|
$settings->default_group_id = (int) $request->input('group_id');
|
||||||
|
|
Loading…
Reference in New Issue