我想在laravel上传文件 - php artisan命令行,但我不知道如何

时间:2018-01-16 13:21:43

标签: laravel upload artisan

并感谢帮助我的建议 我想在laravel上传文件 - php artisan命令行,但我不知道如何

我正在使用此代码:

<?php

namespace App\Console\Commands;

use App\Model\Questions;
use Illuminate\Console\Command;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\Console\Input\InputArgument;

class uploadQuestions extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'admin:uploadQuestions';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Upload questions excel file';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        //TODO upload file
    }
}

我不知道如何指定文件以便上传

0 个答案:

没有答案