diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/DashboardController.php similarity index 78% rename from app/Http/Controllers/HomeController.php rename to app/Http/Controllers/DashboardController.php index 1c39ea6..005f773 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/DashboardController.php @@ -6,7 +6,7 @@ use Illuminate\Http\Request; use Twitter; use App\Tweet; -class HomeController extends Controller +class DashboardController extends Controller { /** * Create a new controller instance. @@ -25,10 +25,12 @@ class HomeController extends Controller */ public function index() { - $queue = Tweet::queued(); - return view('home', [ - 'queue' => $queue ]); } + + public function queue() { + $queue = Tweet::queued(); + return response()->json(['queue'=>$queue]); + } } diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index b82f8be..8c0eff3 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -36,7 +36,7 @@