mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
livewire thread
This commit is contained in:
parent
a60370fbc9
commit
57ab16675e
18 changed files with 244 additions and 25 deletions
|
|
@ -15,6 +15,10 @@ class Thread extends Model
|
|||
|
||||
public $timestamps = false;
|
||||
|
||||
public $casts = [
|
||||
'links' => 'array',
|
||||
];
|
||||
|
||||
public static function schema(Blueprint $table)
|
||||
{
|
||||
$table->string('slug')->unique();
|
||||
|
|
@ -22,6 +26,7 @@ class Thread extends Model
|
|||
$table->string('tweet_id')->nullable();
|
||||
$table->foreignId('author_username')->constrained('authors', 'username');
|
||||
$table->text('content');
|
||||
$table->json('links')->default('{}');
|
||||
$table->timestamp('created_at');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue