<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;


class AlertsController extends Controller
{
  /**
   *
   */
  public function index()
  {
    $alerts = DB::table('alerts')->get();
    return view('alerts.index')->with('alerts', $alerts);
  }
}

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Alert;


class AlertsController extends Controller
{
  /**
   *
   */
  public function index()
  {
    $alerts = Alert::all();
    return view('alerts.index')->with('alerts', $alerts);
  }
}

Use Eqoquent to build query
Use Eqoquent to build query
