Home

Awesome

laravel-materialize-css

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

Installation

    "skydiver/laravel-materialize-css": "dev-master"
    Skydiver\LaravelMaterializeCSS\MaterializeCSSServiceProvider::class,
	'MaterializeCSS' => Skydiver\LaravelMaterializeCSS\MaterializeCSS::class,
    $ php artisan vendor:publish --tag=materializecss --force

Updates

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

    "php artisan vendor:publish --tag=materializecss --force"
    "post-update-cmd": [
        "php artisan optimize",
        "php artisan vendor:publish --tag=materializecss --force"
    ],

Usage

There are differents methods to include Materialize CSS assets:

    {!! 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>
    {!! 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>
    {!! 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">
    {!! MaterializeCSS::include_js() !!}
    <script src="http://yourdomain.com/materialize-css/js/materialize.min.js"></script>
    {!! MaterializeCSS::include_secure_css() !!}
    <link rel="stylesheet" href="https://yourdomain.com/materialize-css/css/materialize.min.css">
    {!! MaterializeCSS::include_secure_js() !!}
    <script type="text/javascript" src="http://yourdomain.com/materialize-css/js/materialize.min.js"></script>
    {!! 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
    {!! 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