Compare commits
3 Commits
03f8cf9c39
...
5234d880a7
| Author | SHA1 | Date |
|---|---|---|
|
|
5234d880a7 | |
|
|
3cde3c221c | |
|
|
dd6ff0f99c |
|
|
@ -23,6 +23,7 @@ class FriendLinkResource extends JsonResource
|
||||||
'is_recommend' => $this->is_recommend,
|
'is_recommend' => $this->is_recommend,
|
||||||
'is_show' => $this->is_show,
|
'is_show' => $this->is_show,
|
||||||
'created_at' => strtotime($this->created_at) ?? 0, //录入时间
|
'created_at' => strtotime($this->created_at) ?? 0, //录入时间
|
||||||
|
'is_iframe' => $this->is_iframe,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ class FriendLink extends Model
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name', 'type', 'content', 'sort', 'is_recommend', 'is_show',
|
'name', 'type', 'content', 'sort', 'is_recommend', 'is_show',
|
||||||
|
'is_iframe',
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function typeMap()
|
public static function typeMap()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('friend_links', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
$table->unsignedInteger('is_iframe')->default(0)->comment('是否iframe打开');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('friend_links', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
$table->dropColumn('is_iframe');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue