2017-25 © Pedro Peláez
 

laravel-plugin laravel-foundation

Override Laravel Auth/Pagination views using Zurb Foundation instead of Twitter Bootstrap.

image

milose/laravel-foundation

Override Laravel Auth/Pagination views using Zurb Foundation instead of Twitter Bootstrap.

  • Wednesday, November 1, 2017
  • by milose
  • Repository
  • 1 Watchers
  • 0 Stars
  • 30 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel Foundation package

UOverride Laravel Auth/Pagination views using Zurb Foundation instead of Twitter Bootstrap., (*1)

1. Installation

To install this package run, (*2)

composer require milose/laravel-foundation

If you are using Laravel version >= 5.5 you can skip the next step., (*3)

Add the service provider to your config/app.php file by finding providers key, and adding this to the end of the list:, (*4)

Milose\LaravelFoundation\LaravelFoundationServiceProvider::class,

2. Using the views

Auth scafolding

In order for Laravel to use the custom views for Authentication, we must import this package traits to the appropriate controllers. These traits override the original methods with updated view names., (*5)

Open all of the files in app/Http/Controllers/Auth, and before every trait add \Milose\LaravelFoundation\Auth\ to override the default view. So, for example, Login controller trait inside the class sould look like:, (*6)

use \Milose\LaravelFoundation\Auth\AuthenticatesUsers;

Instead of:, (*7)

use AuthenticatesUsers;

Do this for all files., (*8)

Pagination

In your blade files you can paginate as usual, by adding:, (*9)

{{ $users->links('lf::pagination.default') }}

Or if you're using simplePaginate then add:, (*10)

{{ $users->links('lf::pagination.simple') }}

3. Customizing the views

If you want to change how the views look, you need to publish the them to your resources/views/vendor directory by running, (*11)

php artisan vendor:publish --tag=lf

After this, in resources/views/vendor/laravelFoundation you will find Blade templates for both authentication and pagination., (*12)

4. Adding Zurb Foundation to your project

Import npm package and copy settings and utils so you can customize Foundation:, (*13)

yarn add foundation-sites motion-ui --dev
mkdir resources/assets/sass/foundation/
cp node_modules/foundation-sites/scss/settings/_settings.scss resources/assets/sass/foundation/
cp -R node_modules/foundation-sites/scss/util/ resources/assets/sass/foundation/util/

SCSS

In your resources/assets/sass/app.scss file remove:, (*14)

// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

And add:, (*15)

// Foundation
@import 'node_modules/foundation-sites/scss/foundation';
@import "foundation/settings";
@include foundation-everything; //or @include only the components you need

// Motion-Ui
@import 'node_modules/motion-ui/motion-ui'

JavaScript

In your resources/assets/js/bootstrap.js file remove:, (*16)

require('bootstrap-sass');

And add:, (*17)

require('motion-ui')
require('what-input')
require('foundation-sites') // or individual components
$(document).ready(function() {
    $(document).foundation()
})

Then run gulp to recompile the assets., (*18)

TODO

  • Test

The Versions

01/11 2017

dev-master

9999999-dev https://github.com/milose/laravel-foundation

Override Laravel Auth/Pagination views using Zurb Foundation instead of Twitter Bootstrap.

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0

 

milose laravelfoundation laravel foundation

01/11 2017

v1.1.0

1.1.0.0 https://github.com/milose/laravel-foundation

Override Laravel Auth/Pagination views using Zurb Foundation instead of Twitter Bootstrap.

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0

 

milose laravelfoundation laravel foundation

01/11 2017

dev-add-autodiscovery

dev-add-autodiscovery https://github.com/milose/laravel-foundation

Override Laravel Auth/Pagination views using Zurb Foundation instead of Twitter Bootstrap.

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0

 

milose laravelfoundation laravel foundation

17/10 2016

v1.0.0

1.0.0.0

Override Laravel Auth/Pagination views using Zurb Foundation instead of Twitter Bootstrap.

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0