Skip to content

Commit

Permalink
restore pagination functionality
Browse files Browse the repository at this point in the history
Closes #87
  • Loading branch information
michaeldyrynda committed Mar 5, 2020
1 parent 61c253a commit af3867a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/TailwindCssPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static function install()
static::updateStyles();
static::updateBootstrapping();
static::updateWelcomePage();
static::updatePagination();
static::removeNodeModules();
}

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

protected static function updatePagination()
{
(new Filesystem)->delete(resource_path('views/vendor/paginate'));

(new Filesystem)->copyDirectory(__DIR__.'/tailwindcss-stubs/resources/views/vendor/pagination', resource_path('views/vendor/pagination'));
}

protected static function updateWelcomePage()
{
(new Filesystem)->delete(resource_path('views/welcome.blade.php'));
Expand Down
5 changes: 5 additions & 0 deletions src/TailwindCssPresetServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaravelFrontendPresets\TailwindCssPreset;

use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;
use Laravel\Ui\UiCommand;
use Laravel\Ui\AuthCommand;
Expand All @@ -23,5 +24,9 @@ public function boot()
$command->info('Tailwind CSS scaffolding with auth views installed successfully.');
$command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
});

Paginator::defaultView('pagination::default');

Paginator::defaultSimpleView('pagination::simple-default');
}
}

0 comments on commit af3867a

Please sign in to comment.