sa
このコミットが含まれているのは:
コミット
3f9412c5b5
|
@ -43,7 +43,7 @@ class MeetingsController extends Controller {
|
||||||
|
|
||||||
// ミームタイプ
|
// ミームタイプ
|
||||||
//// 画像
|
//// 画像
|
||||||
if (substr($r->pdf, -5) != '.jpeg' || substr($r->pdf, -4) != '.jpg' || substr($r->pdf, -4) != '.png' || substr($r->pdf, -4) != '.gif') {
|
if (substr($r->image, -5) == '.jpeg' || substr($r->image, -4) == '.jpg' || substr($r->image, -4) == '.png' || substr($r->image, -4) == '.gif') {
|
||||||
Validator::extend('image_meme', function ($attribute, $value, $params, $validator) {
|
Validator::extend('image_meme', function ($attribute, $value, $params, $validator) {
|
||||||
try {
|
try {
|
||||||
$ok = true;
|
$ok = true;
|
||||||
|
@ -138,17 +138,19 @@ class MeetingsController extends Controller {
|
||||||
$meeting = Meeting::create($insert);
|
$meeting = Meeting::create($insert);
|
||||||
|
|
||||||
foreach ($r->image as $img) {
|
foreach ($r->image as $img) {
|
||||||
$ext = explode('/', mime_content_type($img))[1];
|
if (substr($r->image, -5) != '.jpeg' && substr($r->image, -4) != '.jpg' && substr($r->image, -4) != '.png' && substr($r->image, -4) != '.gif') {
|
||||||
$filename = uniqid() . '.'.$ext;
|
$ext = explode('/', mime_content_type($img))[1];
|
||||||
$image = base64_decode(substr($img, strpos($img, ',') + 1));
|
$filename = uniqid() . '.'.$ext;
|
||||||
Storage::disk('public')->put($filename, $image);
|
$image = base64_decode(substr($img, strpos($img, ',') + 1));
|
||||||
|
Storage::disk('public')->put($filename, $image);
|
||||||
$insert_image = [
|
|
||||||
'meeting_id' => (int)$meeting->id,
|
$insert_image = [
|
||||||
'image' => '/storage/'.$filename,
|
'meeting_id' => (int)$meeting->id,
|
||||||
];
|
'image' => '/storage/'.$filename,
|
||||||
|
];
|
||||||
MeetingImage::create($insert_image);
|
|
||||||
|
MeetingImage::create($insert_image);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (json_decode($r->children) as $child) {
|
foreach (json_decode($r->children) as $child) {
|
||||||
|
|
新しいイシューから参照