<?php
namespace App;
use App\CustomCollection;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
/**
* Create a new Eloquent Collection instance.
*
* @param array $models
* @return \Illuminate\Database\Eloquent\Collection
*/
public function newCollection(array $models = [])
{
return new CustomCollection($models);
}
}
$e->getMessage();
echo $e->getMessage();
$img = Image::make(public_path() . $uploadedFilePath);
try {
$img->orientate();
} catch (NotSupportedException $e) {
// Если не можем повернуть фотку, то просто пропустим ошибку, ничего не делаем
// return response()->json('Не могу повернуть фотографию', 500);
}
$obj->subject=$this->decode($obj->subject);
private function decode($enc){
$parts = imap_mime_header_decode($enc);
$str='';
for ($p=0; $p<count($parts); $p++) {
$ch=$parts[$p]->charset;
$part=$parts[$p]->text;
if ($ch!=='default') $str.=mb_convert_encoding($parts[$p]->text,'UTF-8',$ch);
else $str.=$part;
}
return $str;
}
system('ffmpeg -i in.avi -f segment -segment_time 1 -vcodec copy -acodec copy out%03d.avi',$return);
$f3->route('GET /@controller/@action','\controllers\@controller->@action');