Stuff
This commit is contained in:
parent
fc0df020e8
commit
cecfd21409
2 changed files with 3 additions and 1 deletions
|
@ -89,6 +89,8 @@ class GalleryController extends BaseController
|
|||
$gallery->tenant = session("current_tenant_id");
|
||||
if(!empty($validated["date"])) {
|
||||
$gallery->gallery_create_time = $validated["date"];
|
||||
} else {
|
||||
$gallery->gallery_create_time = date("Y-m-d");
|
||||
}
|
||||
$gallery->saveOrFail();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class Gallery extends Migration
|
|||
$table->string('url');
|
||||
$table->mediumText("description")->nullable();
|
||||
$table->unsignedBigInteger("tenant");
|
||||
$table->date("gallery_create_time")->default(\Illuminate\Support\Facades\DB::raw('(CURRENT_DATE)'));
|
||||
$table->date("gallery_create_time")->nullable();
|
||||
|
||||
|
||||
$table->foreign('tenant')->references('id')->on('tenants');
|
||||
|
|
Loading…
Reference in a new issue