Fewo Mails / Booking Country Services

This commit is contained in:
Kevin Adametz 2020-05-28 19:03:42 +02:00
parent b9c26d06d0
commit 48a6eb2282
154 changed files with 7761 additions and 1643 deletions

View file

@ -0,0 +1,55 @@
<?php
namespace App\Repositories;
use App\Models\CustomerFewoFile;
use Response;
class CustomerFewoFileRepository extends FileRepository {
protected $customer_file;
protected $travel_user_id;
protected $customer_fewo_mail_id;
protected $identifier;
public function __construct(CustomerFewoFile $model){
parent::__construct();
$this->model = $model;
}
public function save(){
$this->customer_file = CustomerFewoFile::create([
'travel_user_id' => $this->travel_user_id,
'customer_fewo_mail_id' => $this->customer_fewo_mail_id,
'identifier' => $this->identifier,
'filename' => $this->allowed_filename,
'dir' => $this->dir,
'original_name' => $this->originalName,
'ext' => $this->extension,
'mine' => $this->mine,
'size' => $this->size
]);
}
public function response(){
return Response::json([
'error' => false,
'original_name' => $this->originalName,
'filename' => $this->allowed_filename,
'file_id' =>$this->customer_file->id,
'file_data' => $this->extension,
'file_icon' => $this->customer_file->getIconExt(),
'file_format_bytes' => $this->customer_file->formatBytes(),
'file_url' => $this->customer_file->getURL(),
'redirect' => '',
'code' => 200
], 200);
}
}