FarmerImport.php 492 字节
<?php

namespace App\Admin\Actions\Importer;

use Encore\Admin\Actions\Action;
use Illuminate\Http\Request;

class FarmerImport extends Action
{
    protected $selector = '.farmer-import';

    public function handle(Request $request)
    {
        // $request ...

        return $this->response()->success('Success message...')->refresh();
    }

    public function html()
    {
        return <<<HTML
        <a class="btn btn-sm btn-default farmer-import">导入数据</a>
HTML;
    }
}