Fewo Mails / Booking Country Services
This commit is contained in:
parent
b9c26d06d0
commit
48a6eb2282
154 changed files with 7761 additions and 1643 deletions
53
app/Repositories/BookingFewoFileRepository.php
Normal file
53
app/Repositories/BookingFewoFileRepository.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Models\BookingFile;
|
||||
use App\Models\TravelUserBookingFile;
|
||||
use Response;
|
||||
|
||||
class BookingFewoFileRepository extends FileRepository {
|
||||
|
||||
|
||||
|
||||
protected $booking_fewo_file;
|
||||
protected $travel_user_booking_fewo_id;
|
||||
protected $identifier;
|
||||
|
||||
|
||||
public function __construct(TravelUserBookingFile $model){
|
||||
parent::__construct();
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function save(){
|
||||
$this->booking_fewo_file = TravelUserBookingFile::create([
|
||||
'travel_user_booking_fewo_id' => $this->travel_user_booking_fewo_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,
|
||||
'filename' => $this->allowed_filename,
|
||||
'file_id' =>$this->booking_fewo_file->id,
|
||||
'file_data' => $this->extension,
|
||||
'file_icon' => $this->booking_fewo_file->getIconExt(),
|
||||
'file_format_bytes' => $this->booking_fewo_file->formatBytes(),
|
||||
'file_url' => $this->booking_fewo_file->getURL(),
|
||||
'redirect' => '',
|
||||
'code' => 200
|
||||
], 200);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue