Compare commits
6 Commits
f949d926df
...
d37de8c61c
| Author | SHA1 | Date | |
|---|---|---|---|
| d37de8c61c | |||
| 3d79e24ff5 | |||
| 29ce166b4d | |||
| e5e8ef5a75 | |||
| 9534d68b24 | |||
| 00fe485cbe |
@ -181,7 +181,18 @@ class ReceiptController extends Controller
|
|||||||
|
|
||||||
$krgmStoragePath = config('app.krgm_storage_path');
|
$krgmStoragePath = config('app.krgm_storage_path');
|
||||||
$linkPath = public_path('other-storage');
|
$linkPath = public_path('other-storage');
|
||||||
dd($linkPath);
|
if (!file_exists($krgmStoragePath)) {
|
||||||
|
\Log::error('KRGM path not found: ' . $krgmStoragePath);
|
||||||
|
abort(404, '画像パスが見つかりません。');
|
||||||
|
}
|
||||||
|
if (!file_exists($linkPath)) {
|
||||||
|
$result = symlink($krgmStoragePath, $linkPath);
|
||||||
|
\Log::info('Symlink result: ' . ($result ? 'success' : 'failed'));
|
||||||
|
if (!$result) {
|
||||||
|
\Log::error('Symlink failed');
|
||||||
|
abort(500, 'リンク作成失敗');
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!file_exists($linkPath)) {
|
if (!file_exists($linkPath)) {
|
||||||
symlink($krgmStoragePath, $linkPath);
|
symlink($krgmStoragePath, $linkPath);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ return new class extends Migration
|
|||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('management', function (Blueprint $table) {
|
Schema::create('management', function (Blueprint $table) {
|
||||||
$table->id('management_id'); // 主キー、AUTO_INCREMENT, NOT NULL
|
$table->increments('management_id'); // 主キー、AUTO_INCREMENT, NOT NULL
|
||||||
$table->string('management_name', 255); // varchar(255), NOT NULL
|
$table->string('management_name', 255); // varchar(255), NOT NULL
|
||||||
$table->string('management_code', 10)->unique(); // varchar(10), NOT NULL, UNIQUE
|
$table->string('management_code', 10)->unique(); // varchar(10), NOT NULL, UNIQUE
|
||||||
$table->boolean('municipality_flag')->nullable(); // tinyint(1), NULL
|
$table->boolean('municipality_flag')->nullable(); // tinyint(1), NULL
|
||||||
|
|||||||
@ -134,22 +134,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@php
|
@php
|
||||||
// $stamp_file = null;
|
|
||||||
// $extensions = ['png', 'jpeg', 'jpg'];
|
|
||||||
// foreach ($extensions as $ext) {
|
|
||||||
// $file_path = public_path('images/' . $inv_setting->t_name . '_stamp.' . $ext);
|
|
||||||
// if (file_exists($file_path)) {
|
|
||||||
// $stamp_file = $inv_setting->t_name . '_stamp.' . $ext;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
$stamp_file = null;
|
$stamp_file = null;
|
||||||
if (!empty($inv_setting->company_image_path)) {
|
if (!empty($inv_setting->company_image_path)) {
|
||||||
// company_image_path: storage/app/public/xxx.png → other-storage/xxx.png
|
// company_image_path: storage/app/public/xxx.png → other-storage/xxx.png
|
||||||
$stamp_file = str_replace('storage/app/public/', 'other-storage/', $inv_setting->company_image_path);
|
$stamp_file = str_replace('storage/app/public/', 'other-storage/', $inv_setting->company_image_path);
|
||||||
|
}
|
||||||
@endphp
|
@endphp
|
||||||
@if($stamp_file)
|
@if($stamp_file)
|
||||||
<td><img src="{{ str_replace('\\', '/', public_path('images/' . $stamp_file)) }}" class="stamp"></td>
|
<td><img src="{{ asset($stamp_file) }}" class="stamp"></td>
|
||||||
@endif
|
@endif
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user