Skip to content

Commit

Permalink
Some Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
YasserElgammal committed Jan 15, 2023
1 parent ae3cd37 commit 6c40d62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/Http/Controllers/Admin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use App\Models\Category;
use App\Models\Post;
use App\Models\Tag;
use App\Models\User;
use Illuminate\Support\Facades\Auth;

class AdminController extends Controller
Expand All @@ -15,7 +16,7 @@ public function index()
$categories = Category::count();
$posts = Post::count();
$tags = Tag::count();
$users = Tag::count();
$users = User::count();

return view('admin.index', compact('categories', 'posts', 'tags', 'users'));
}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/page/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<tr class="hover:bg-grey-lighter">
<td class="py-4 px-6 border-b border-grey-light">{{ $page->id }}</td>
<td class="py-4 px-6 border-b border-grey-light">{{ $page->name }}</td>
<td class="py-4 px-6 border-b border-grey-light">{{ $page->slug }}</td>
<td class="py-4 px-6 border-b border-grey-light">{{ $page->user->name }}</td>
<td class="py-4 px-6 border-b border-grey-light">

<button class="px-4 py-1 text-white font-light tracking-wider bg-green-600 rounded" type="button" onclick="location.href='{{ route('admin.page.edit', $page->id) }}';">Edit</button>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/user/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
{{-- --}}
</div>
<button class="px-4 py-1 text-white font-light tracking-wider bg-green-600 rounded">Update Tag</button>
<button class="px-4 py-1 text-white font-light tracking-wider bg-green-600 rounded">Update Role</button>
</form>
</div>
</main>
Expand Down

0 comments on commit 6c40d62

Please sign in to comment.