Compare commits
2 Commits
caeb0a5afd
...
077872d418
| Author | SHA1 | Date | |
|---|---|---|---|
| 077872d418 | |||
|
|
79f09236ab |
@@ -52,7 +52,15 @@ class TestingTempResource extends Resource
|
|||||||
$set('attachment', null);
|
$set('attachment', null);
|
||||||
if (! $plantId) {
|
if (! $plantId) {
|
||||||
$set('ivPlantError', 'Please select a plant first.');
|
$set('ivPlantError', 'Please select a plant first.');
|
||||||
|
} else {
|
||||||
|
$plantCode = Plant::find($plantId)?->code ?? null;
|
||||||
|
|
||||||
|
$directory = "uploads/temp/{$plantCode}";
|
||||||
|
if (! Storage::disk('local')->exists($directory)) {
|
||||||
|
Storage::disk('local')->makeDirectory($directory);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
})
|
})
|
||||||
->extraAttributes(fn ($get) => [
|
->extraAttributes(fn ($get) => [
|
||||||
|
|||||||
Reference in New Issue
Block a user