This project is meant to demonstrate how pagination can be implemented with Laravel and Angular.
- The project demo is currently up and running at http://demo1.robotmonster.ca/.
- The Angular portion of the project can be found in the
angular-client/
folder. - The Angular component demonstrating basic native Laravel pagination with Angular UI is
angular-client/src/app/basic-pagination
(link) . - The Angular component demonstrating searchable native Laravel pagination with Angular UI is
angular-client/src/app/search-pagination
(link) .
To get the project installed and running locally:
- Clone the repository.
- Install the laravel project with composer
composer install
. - Create your .env file with your db connection information. Have the db and db user created:
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:W5JIu+haj30/3+XIhXXEva9GISBjcA+aZ6tIKCiGRmA=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_pagination_sample
DB_USERNAME=laravelpaginationsample
DB_PASSWORD=laravelpaginationsample
BROADCAST_DRIVER=log
CACHE_DRIVER=array
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
- Run
php artisan migrate:refresh --seed
to set up your database tables. - Install Angular's NPM moduls:
cd angular-client && npm install
- Build the Angular project so Laravel can serve it:
ng build --watch
- In a new process start the Laravel server from the project root:
php artisan serve
- View the project at
localhost:8000/angular