Skip to content

About

Materialize CSS Framework for Laravel 5

Topics

Resources

Stars

44 stars

Watchers

9 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-materialize-css

Materialize CSS Framework for Laravel 5 [http://materializecss.com/]

Installation

  • Require this package in your composer.json and run composer update.
    "skydiver/laravel-materialize-css": "dev-master"
  • After updating composer, add ServiceProvider to the providers array in config/app.php
    Skydiver\LaravelMaterializeCSS\MaterializeCSSServiceProvider::class,
  • Add Facade to the aliases array in config/app.php
	'MaterializeCSS' => Skydiver\LaravelMaterializeCSS\MaterializeCSS::class,
  • Then publish the package's assets to public folder:
    $ php artisan vendor:publish --tag=materializecss --force

Updates

You can re-publish the assets automatically when composer updated the package:

  • In your composer.json, go to scripts > post-update-cmd section, add the next line:
    "php artisan vendor:publish --tag=materializecss --force"
  • The code will look similar to:
    "post-update-cmd": [
        "php artisan optimize",
        "php artisan vendor:publish --tag=materializecss --force"
    ],

Usage

There are differents methods to include Materialize CSS assets:

  • include_full()
    {!! MaterializeCSS::include_full() !!}
    <link rel="stylesheet" charset="utf-8" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" charset="utf-8" href="http://yourdomain.com/materialize-css/css/materialize.min.css">
    <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
    <script type="text/javascript" src="http://yourdomain.com/materialize-css/js/materialize.min.js"></script>
  • include_all()
    {!! MaterializeCSS::include_all() !!}
    <link rel="stylesheet" charset="utf-8" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" charset="utf-8" href="http://yourdomain.com/materialize-css/css/materialize.min.css">
    <script type="text/javascript" src="http://yourdomain.com/materialize-css/js/materialize.min.js"></script>
  • include_css()
    {!! MaterializeCSS::include_css() !!}
    <link rel="stylesheet" charset="utf-8" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" charset="utf-8" href="http://yourdomain.com/materialize-css/css/materialize.min.css">
  • include_js()
    {!! MaterializeCSS::include_js() !!}
    <script src="http://yourdomain.com/materialize-css/js/materialize.min.js"></script>
  • include_secure_css()
    {!! MaterializeCSS::include_secure_css() !!}
    <link rel="stylesheet" href="https://yourdomain.com/materialize-css/css/materialize.min.css">
  • include_secure_js()
    {!! MaterializeCSS::include_secure_js() !!}
    <script type="text/javascript" src="http://yourdomain.com/materialize-css/js/materialize.min.js"></script>
  • get_url_css($full=false, $secure=false)
    {!! MaterializeCSS::get_url_css() !!}
    {!! MaterializeCSS::get_url_css(true, false) !!}
    {!! MaterializeCSS::get_url_css(false, true) !!}
    {!! MaterializeCSS::get_url_css(true, true) !!}
    /materialize-css/css/materialize.min.css
    http://yourdomain.com/materialize-css/css/materialize.min.css
    /materialize-css/css/materialize.min.css
    https://yourdomain.com/materialize-css/css/materialize.min.css
  • get_url_js($full=false, $secure=false)
    {!! MaterializeCSS::get_url_js() !!}
    {!! MaterializeCSS::get_url_js(true, false) !!}
    {!! MaterializeCSS::get_url_js(false, true) !!}
    {!! MaterializeCSS::get_url_js(true, true) !!}
    /materialize-css/js/materialize.min.js
    http://yourdomain.com/materialize-css/js/materialize.min.js
    /materialize-css/js/materialize.min.js
    https://yourdomain.com/materialize-css/js/materialize.min.js

About

Materialize CSS Framework for Laravel 5

Topics

Resources

Stars

44 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages