-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from krekas/demo-table
Demo table
- Loading branch information
Showing
18 changed files
with
410 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
resources/stubs/breeze/notusjs/views/users/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<x-app-layout> | ||
<div class="w-full px-4"> | ||
<div class="relative flex flex-col min-w-0 break-words w-full mb-6 shadow-lg rounded bg-white"> | ||
<div class="rounded-t mb-0 px-4 py-3 border-0"> | ||
<div class="flex flex-wrap items-center"> | ||
<div class="relative w-full px-4 max-w-full flex-grow flex-1"> | ||
<h3 class="font-semibold text-lg text-blueGray-700"> | ||
{{ __('Users') }} | ||
</h3> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="block w-full overflow-x-auto"> | ||
<table class="items-center w-full bg-transparent border-collapse"> | ||
<thead> | ||
<tr> | ||
<th class="px-6 align-middle border border-solid py-3 text-xs uppercase border-l-0 border-r-0 whitespace-nowrap font-semibold text-left bg-blueGray-50 text-blueGray-500 border-blueGray-100"> | ||
Name | ||
</th> | ||
<th class="px-6 align-middle border border-solid py-3 text-xs uppercase border-l-0 border-r-0 whitespace-nowrap font-semibold text-left bg-blueGray-50 text-blueGray-500 border-blueGray-100"> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach($users as $user) | ||
<tr> | ||
<td class="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-nowrap p-4"> | ||
{{ $user->name }} | ||
</td> | ||
<td class="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-nowrap p-4"> | ||
{{ $user->email }} | ||
</td> | ||
</tr> | ||
</tbody> | ||
@endforeach | ||
</table> | ||
</div> | ||
</div> | ||
|
||
{{ $users->links() }} | ||
|
||
</div> | ||
</x-app-layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
resources/stubs/breeze/tailwindcomponents/views/users/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<x-app-layout> | ||
<x-slot name="header"> | ||
{{ __('Users') }} | ||
</x-slot> | ||
|
||
<div class="inline-block min-w-full shadow rounded-lg overflow-hidden"> | ||
|
||
<table class="min-w-full leading-normal"> | ||
<thead> | ||
<tr> | ||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider"> | ||
Name | ||
</th> | ||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider"> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach($users as $user) | ||
<tr> | ||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm"> | ||
<p class="text-gray-900 whitespace-no-wrap">{{ $user->name }}</p> | ||
</td> | ||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm"> | ||
<p class="text-gray-900 whitespace-no-wrap">{{ $user->email }}</p> | ||
</td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
|
||
<div class="px-5 py-5 bg-white border-t flex flex-col xs:flex-row items-center xs:justify-between"> | ||
{{ $users->links() }} | ||
</div> | ||
</div> | ||
|
||
</x-app-layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
resources/stubs/breeze/windmill/views/users/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<x-app-layout> | ||
<x-slot name="header"> | ||
{{ __('Users') }} | ||
</x-slot> | ||
|
||
<div class="p-4 bg-white rounded-lg shadow-xs"> | ||
|
||
<div class="overflow-hidden mb-8 w-full rounded-lg border shadow-xs"> | ||
<div class="overflow-x-auto w-full"> | ||
<table class="w-full whitespace-no-wrap"> | ||
<thead> | ||
<tr class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase bg-gray-50 border-b"> | ||
<th class="px-4 py-3">Name</th> | ||
<th class="px-4 py-3">Email</th> | ||
</tr> | ||
</thead> | ||
<tbody class="bg-white divide-y"> | ||
@foreach($users as $user) | ||
<tr class="text-gray-700"> | ||
<td class="px-4 py-3 text-sm"> | ||
{{ $user->name }} | ||
</td> | ||
<td class="px-4 py-3 text-sm"> | ||
{{ $user->email }} | ||
</td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
</div> | ||
<div class="px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase bg-gray-50 border-t sm:grid-cols-9"> | ||
{{ $users->links() }} | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</x-app-layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Models\User; | ||
|
||
class UserController extends Controller | ||
{ | ||
public function index() | ||
{ | ||
$users = User::paginate(); | ||
|
||
return view('users.index', compact('users')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
|
||
Route::view('about', 'about')->name('about')->middleware('auth'); | ||
|
||
Route::get('users', [\App\Http\Controllers\UserController::class, 'index'])->name('users.index'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App\Providers; | ||
|
||
use Illuminate\Pagination\Paginator; | ||
use Illuminate\Support\ServiceProvider; | ||
|
||
class AppServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Register any application services. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Bootstrap any application services. | ||
* | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
Paginator::useBootstrap(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
@extends('layouts.app') | ||
|
||
@section('content') | ||
<!-- Content Header (Page header) --> | ||
<div class="content-header"> | ||
<div class="container-fluid"> | ||
<div class="row mb-2"> | ||
<div class="col-sm-6"> | ||
<h1 class="m-0">{{ __('Users') }}</h1> | ||
</div><!-- /.col --> | ||
</div><!-- /.row --> | ||
</div><!-- /.container-fluid --> | ||
</div> | ||
<!-- /.content-header --> | ||
|
||
<!-- Main content --> | ||
<div class="content"> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-lg-12"> | ||
|
||
<div class="card"> | ||
<div class="card-body p-0"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Email</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach($users as $user) | ||
<tr> | ||
<td>{{ $user->name }}</td> | ||
<td>{{ $user->email }}</td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /.card-body --> | ||
|
||
<div class="card-footer clearfix"> | ||
{{ $users->links() }} | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
<!-- /.row --> | ||
</div><!-- /.container-fluid --> | ||
</div> | ||
<!-- /.content --> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@extends('layouts.app') | ||
|
||
@section('content') | ||
<div class="card mb-4"> | ||
<div class="card-header"> | ||
{{ __('Users') }} | ||
</div> | ||
<div class="card-body"> | ||
|
||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Name</th> | ||
<th scope="col">Email</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach($users as $user) | ||
<tr> | ||
<td>{{ $user->name }}</td> | ||
<td>{{ $user->email }}</td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
|
||
</div> | ||
|
||
<div class="card-footer"> | ||
{{ $users->links() }} | ||
</div> | ||
</div> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.