Level 3
The issue here was in the nova documentation: The issue was mainly in using queuable with file uploading. I also changed the storage code to function better. Hope this helps someone!
class ProvideMoreInformationFor extends Action
{
use SerializesModels;
/**
* Perform the action on the given models.
*
* @param \Laravel\Nova\Fields\ActionFields $fields
* @param \Illuminate\Support\Collection $models
* @return mixed
*/
public function handle(ActionFields $fields, Collection $models)
{
foreach($models as $job) {
$fields->file->storeAs('jobs/'.$job->folder, $fields->file->getClientOriginalName(), 'local');
}
}
/**
* Get the fields available on the action.
*
* @return array
*/
public function fields()
{
return [
File::make('File')->disk('local')->rules('required')
];
}
}
2 likes