https://github.com/medilies/trying-splade
Trying splade
https://github.com/medilies/trying-splade
components laravel splade tables
Last synced: 2 months ago
JSON representation
Trying splade
- Host: GitHub
- URL: https://github.com/medilies/trying-splade
- Owner: medilies
- Created: 2022-10-10T22:27:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-11T22:04:46.000Z (over 3 years ago)
- Last Synced: 2025-01-24T10:47:36.447Z (over 1 year ago)
- Topics: components, laravel, splade, tables
- Language: PHP
- Homepage: https://splade.dev/docs
- Size: 2.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Trying splade
## Setup steps
```bash
laravel new trying-splade
```
```bash
cd trying-splade
```
```bash
composer require protonemedia/laravel-splade
```
```bash
php artisan splade:install
```
```bash
npm install
```
Run dev servers:
```bash
npm run dev
```
```bash
php artisan serv
```
## Fast data with elaborate-code/laravel-algerian-provinces
```bash
composer require elaborate-code/laravel-algerian-provinces
```
## Basic table
```php
// routes\web.php
use ElaborateCode\AlgerianProvinces\Models\Wilaya;
use Illuminate\Support\Facades\Route;
use ProtoneMedia\Splade\SpladeTable;
Route::get('/', function () {
$wilayas = Wilaya::paginate(10);
return view('home')
->with(
'wilayas',
SpladeTable::for($wilayas)
->column('id')
->column('fr_name')
->column('ar_name')
);
})
->middleware(['splade'])
->name('home');
```
```html
{{ __('Home') }}
```
### Results
On `http://127.0.0.1:8000/?page=4`
