Browse Source

rename home to dashboard

master
Aaron Parecki 7 years ago
parent
commit
3ca61f215a
No known key found for this signature in database GPG Key ID: 276C2817346D6056
4 changed files with 10 additions and 7 deletions
  1. +6
    -4
      app/Http/Controllers/DashboardController.php
  2. +1
    -1
      resources/views/layouts/app.blade.php
  3. +1
    -1
      resources/views/welcome.blade.php
  4. +2
    -1
      routes/web.php

app/Http/Controllers/HomeController.php → app/Http/Controllers/DashboardController.php View File

@ -6,7 +6,7 @@ use Illuminate\Http\Request;
use Twitter; use Twitter;
use App\Tweet; use App\Tweet;
class HomeController extends Controller
class DashboardController extends Controller
{ {
/** /**
* Create a new controller instance. * Create a new controller instance.
@ -25,10 +25,12 @@ class HomeController extends Controller
*/ */
public function index() public function index()
{ {
$queue = Tweet::queued();
return view('home', [ return view('home', [
'queue' => $queue
]); ]);
} }
public function queue() {
$queue = Tweet::queued();
return response()->json(['queue'=>$queue]);
}
} }

+ 1
- 1
resources/views/layouts/app.blade.php View File

@ -36,7 +36,7 @@
<div class="collapse navbar-collapse" id="app-navbar-collapse"> <div class="collapse navbar-collapse" id="app-navbar-collapse">
<!-- Left Side Of Navbar --> <!-- Left Side Of Navbar -->
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="{{ route('home') }}">Dashboard</a></li>
<li><a href="{{ route('dashboard') }}">Dashboard</a></li>
@can('admin') @can('admin')
<li><a href="{{ route('teams') }}">Teams</a></li> <li><a href="{{ route('teams') }}">Teams</a></li>
@endcan @endcan

+ 1
- 1
resources/views/welcome.blade.php View File

@ -69,7 +69,7 @@
@if (Route::has('login')) @if (Route::has('login'))
<div class="top-right links"> <div class="top-right links">
@if (Auth::check()) @if (Auth::check())
<a href="{{ url('/home') }}">Dashboard</a>
<a href="{{ url('/dashboard') }}">Dashboard</a>
@else @else
<a href="{{ url('/login') }}">Login</a> <a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/register') }}">Register</a> <a href="{{ url('/register') }}">Register</a>

+ 2
- 1
routes/web.php View File

@ -17,7 +17,8 @@ Route::get('/', function () {
Auth::routes(); Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
Route::get('/dashboard', 'DashboardController@index')->name('dashboard');
Route::get('/dashboard/queue', 'DashboardController@queue')->name('queue');
Route::get('/teams', 'TeamController@index')->name('teams'); Route::get('/teams', 'TeamController@index')->name('teams');
Route::post('/teams/new', 'TeamController@create_team'); Route::post('/teams/new', 'TeamController@create_team');

Loading…
Cancel
Save