Guest User

Untitled

a guest
Jul 18th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. class FileHandling
  2. {
  3. public function __construct($request, $file) {
  4. $this->file = $request->file($file);
  5. }
  6.  
  7. public function get_file_info() {
  8. return pathinfo($this->file->getClientOriginalName());
  9. }
  10.  
  11.  
  12. public function get_file() {
  13. return $this->file;
  14. }
  15.  
  16. public function move_file($destination) {
  17. $this->file->move($destination , $this->get_file_info()['basename']);
  18. }
  19. }
Add Comment
Please, Sign In to add comment