diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 3ad994eed..1b8e4bfbc 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -30,8 +30,9 @@ class StatusController extends Controller $user = Auth::user(); $this->validate($request, [ - 'photo' => 'required|image|max:15000', - 'caption' => 'string|max:150' + 'photo' => 'required|image|max:15000', + 'caption' => 'string|max:150', + 'nullable' => 'string|max:420' ]); $monthHash = hash('sha1', date('Y') . date('m')); @@ -43,6 +44,7 @@ class StatusController extends Controller $status = new Status; $status->profile_id = $profile->id; $status->caption = $request->caption; + $status->description = $request->description; $status->save(); $media = new Media; diff --git a/database/migrations/2018_06_01_203000_create_description_column.php b/database/migrations/2018_06_01_203000_create_description_column.php new file mode 100644 index 000000000..f347211f4 --- /dev/null +++ b/database/migrations/2018_06_01_203000_create_description_column.php @@ -0,0 +1,32 @@ +string('description')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('statuses', function (Blueprint $table) { + $table->dropColumn('description'); + }); + } +} diff --git a/resources/views/admin/media/home.blade.php b/resources/views/admin/media/home.blade.php index bb1d1dcc2..5c16b2fe6 100644 --- a/resources/views/admin/media/home.blade.php +++ b/resources/views/admin/media/home.blade.php @@ -11,7 +11,11 @@ @foreach($media as $status)
@endforeach @@ -21,4 +25,4 @@