Skip to content

Commit af3867a

Browse files
restore pagination functionality
Closes #87
1 parent 61c253a commit af3867a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/TailwindCssPreset.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public static function install()
1717
static::updateStyles();
1818
static::updateBootstrapping();
1919
static::updateWelcomePage();
20+
static::updatePagination();
2021
static::removeNodeModules();
2122
}
2223

@@ -68,6 +69,13 @@ protected static function updateBootstrapping()
6869
copy(__DIR__.'/tailwindcss-stubs/resources/js/bootstrap.js', resource_path('js/bootstrap.js'));
6970
}
7071

72+
protected static function updatePagination()
73+
{
74+
(new Filesystem)->delete(resource_path('views/vendor/paginate'));
75+
76+
(new Filesystem)->copyDirectory(__DIR__.'/tailwindcss-stubs/resources/views/vendor/pagination', resource_path('views/vendor/pagination'));
77+
}
78+
7179
protected static function updateWelcomePage()
7280
{
7381
(new Filesystem)->delete(resource_path('views/welcome.blade.php'));

src/TailwindCssPresetServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace LaravelFrontendPresets\TailwindCssPreset;
44

5+
use Illuminate\Pagination\Paginator;
56
use Illuminate\Support\ServiceProvider;
67
use Laravel\Ui\UiCommand;
78
use Laravel\Ui\AuthCommand;
@@ -23,5 +24,9 @@ public function boot()
2324
$command->info('Tailwind CSS scaffolding with auth views installed successfully.');
2425
$command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
2526
});
27+
28+
Paginator::defaultView('pagination::default');
29+
30+
Paginator::defaultSimpleView('pagination::simple-default');
2631
}
2732
}

0 commit comments

Comments
 (0)