1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Admin\Actions\Grid;
- use App\Admin\Actions\Form\ResetPasswordForm;
- use App\Models\Account;
- use Dcat\Admin\Actions\Response;
- use Dcat\Admin\Form\AbstractTool;
- use Dcat\Admin\Grid\RowAction;
- use Dcat\Admin\Traits\HasPermissions;
- use Dcat\Admin\Widgets\Modal;
- use Illuminate\Contracts\Auth\Authenticatable;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Http\Request;
- class ResetPassword extends AbstractTool
- {
- /**
- * @return string
- */
- protected $title = '重置密码';
- protected $model;
- public function __construct(string $model = null, $id = 0)
- {
- $this->model = $model;
- $this->title = '<i class="feather icon-lock"></i> ' . $this->title;
- $this->id = $id;
- }
- public function render()
- {
- $form = ResetPasswordForm::make()->payload(['id' => $this->id]);
- return Modal::make()
- ->lg()
- ->title($this->title)
- ->body($form)
- ->button($this->title);
- }
- }
|