Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel save file or picture directory

$dir_ktp = 'frontend/assets/img/foto_ktp/' . date('Y') . '/' . date('m');
$ext_ktp = $input['foto_ktp']->getClientOriginalExtension();
$ktp = $dir_ktp . '/' . Str::random(20) . '_' . date('d') . '_' . md5(time())  . '.' . $ext_ktp;
$input['foto_ktp']->move(public_path($dir_ktp), $ktp);
Source by www.itsolutionstuff.com #
 
PREVIOUS NEXT
Tagged: #laravel #save #file #picture #directory
ADD COMMENT
Topic
Name
8+6 =