Merge branch 'develop' of https://github.com/nakazawakan/kikikanri into c_account
このコミットが含まれているのは:
コミット
8c6264b9c9
|
@ -180,17 +180,20 @@ class ChildrenController extends Controller {
|
|||
return ['status_code' => 200, 'params' => $result];
|
||||
}
|
||||
|
||||
public function listOfFather (Request $r) {
|
||||
public function listOfFather ($father_id) {
|
||||
if (!isset($father_id)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
$result = [];
|
||||
$child_select = ['id', 'image', 'last_name', 'first_name'];
|
||||
$child_select = ['first_name', 'last_name', 'tel'];
|
||||
|
||||
if (null === ($list = FatherRelation::select('father_id')->where('father_id', (int)$r->father_id)->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = FatherRelation::select('child_id')->where('father_id', (int)$father_id)->orderBy('created_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
foreach ($list as $l) {
|
||||
if (null === ($result[] = Child::select($child_select)->find($l->father_id))) {
|
||||
return ['status_code' => 400];
|
||||
foreach ($list as $i => $l) {
|
||||
if (null === ($result[] = Child::select($child_select)->where('id', $l->child_id)->first())) {
|
||||
$result[$i] = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -526,17 +526,22 @@ class MeetingsController extends Controller {
|
|||
if (isset($r->pdf)) {
|
||||
$filename = uniqid() . '.pdf';
|
||||
$pdf = base64_decode(substr($r->pdf, strpos($r->pdf, ',') + 1));
|
||||
$update['pdf'] = '/storage/'.$filename;
|
||||
|
||||
if ($chk = Meeting::select('pdf')->where('id', (int)$meeting_id)->first() && strcmp($chk->pdf, $r->pdf) != 0) {
|
||||
if (Storage::disk('public')->exists($chk->pdf)) {
|
||||
if (Storage::disk('public')->get($chk->pdf) != $pdf) {
|
||||
Storage::disk('public')->delete($chk->pdf);
|
||||
if ($chk = Meeting::select('pdf')->where('id', (int)$meeting_id)->first()) {
|
||||
$opdf = str_replace('/storage/', '', $chk->pdf);
|
||||
if (strcmp(Storage::disk('public')->get($opdf), $pdf) !== 0) {
|
||||
if (Storage::disk('public')->exists($opdf)) {
|
||||
Storage::disk('public')->delete($opdf);
|
||||
}
|
||||
|
||||
$update['pdf'] = '/storage/'.$filename;
|
||||
Storage::disk('public')->put($filename, $pdf);
|
||||
}
|
||||
}
|
||||
|
||||
Storage::disk('public')->put($filename, $pdf);
|
||||
else {
|
||||
$update['pdf'] = '/storage/'.$filename;
|
||||
Storage::disk('public')->put($filename, $pdf);
|
||||
}
|
||||
}
|
||||
|
||||
Meeting::where('id', (int)$meeting_id)->update($update);
|
||||
|
|
|
@ -10,6 +10,7 @@ server {
|
|||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
client_max_body_size 10M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
|
新しいイシューから参照