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)
- + description) + alt="{{$status->description}}" + @endif + >
@endforeach @@ -21,4 +25,4 @@
{{$media->links()}}
-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/discover/home.blade.php b/resources/views/discover/home.blade.php index 0bce0f326..6b6f0cbbd 100644 --- a/resources/views/discover/home.blade.php +++ b/resources/views/discover/home.blade.php @@ -33,7 +33,11 @@ @foreach($posts as $status)
- + description) + alt="{{$status->description}}" + @endif + >
@endforeach @@ -41,4 +45,4 @@ -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index 3e34a4c1a..f14a5cd84 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -101,7 +101,11 @@ @foreach($timeline as $status)
- + description) + alt="{{$status->description}}" + @endif + >
@endforeach @@ -120,4 +124,4 @@ -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index 667eabc05..6b4597b9b 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -9,7 +9,11 @@
- + description) + alt="{{$status->description}}" + @endif + >
@@ -70,4 +74,4 @@
-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/status/template.blade.php b/resources/views/status/template.blade.php index b0019e989..8f159e12f 100644 --- a/resources/views/status/template.blade.php +++ b/resources/views/status/template.blade.php @@ -18,7 +18,11 @@
- + description) + alt="{{$item->description}}" + @endif + >
@@ -78,4 +82,4 @@
-
\ No newline at end of file + diff --git a/resources/views/timeline/personal.blade.php b/resources/views/timeline/personal.blade.php index d5458ac5e..a44941ba1 100644 --- a/resources/views/timeline/personal.blade.php +++ b/resources/views/timeline/personal.blade.php @@ -30,6 +30,10 @@ +
+ + +
@@ -59,4 +63,4 @@ -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/timeline/public.blade.php b/resources/views/timeline/public.blade.php index 94488429e..fcdbbf2d3 100644 --- a/resources/views/timeline/public.blade.php +++ b/resources/views/timeline/public.blade.php @@ -30,6 +30,10 @@ +
+ + +
@@ -50,4 +54,4 @@ -@endsection \ No newline at end of file +@endsection