diff --git a/app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php b/app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php index f8603880..cac269db 100644 --- a/app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php +++ b/app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php @@ -17,7 +17,7 @@ class CreateIncidentsTable extends Migration { $table->increments('id'); $table->tinyInteger('component')->default(1); $table->string('name'); - $table->tinyInteger('status', 1); + $table->tinyInteger('status', 1)->default(1); $table->longText('message'); $table->timestamps(); $table->softDeletes(); diff --git a/app/views/incident.blade.php b/app/views/incident.blade.php index c01cb5a5..47b2396b 100644 --- a/app/views/incident.blade.php +++ b/app/views/incident.blade.php @@ -1,6 +1,6 @@ subDays($i); - $incidents = Incident::where('created_at', $incidentDate)->get() + $incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->get(); ?>
  • {{ $incidentDate->format('jS M, Y') }}

    @@ -11,6 +11,7 @@ @foreach($incidents as $incident)
  • {{ $incident->name }}

    +

    {{ $incident->message }}

  • @endforeach