Template Variables

Every view in Kickflip will be rendered with a few kinds of variables available to it. The primary variable types are:

Global Shared Data

Adding data that will be accessible to all views is super easy. This is mainly because Laravel's Blademakes this really easy. And because Kickflip uses the same provider for Blade as Laravel things work very similar.

In Kickflip, this is done simply by using View::share('key', 'value')just like in Laravel. The proper place to add these into would be in your sites config/bootstrap.phpfile.

For example, Kickflip itself loads the SiteData::classinstance using:

    View::share(
        'site',
        SiteData::fromConfig(KickflipHelper::config('site', []), KickflipHelper::config('siteNav', []))
    );

This bootstrap config file will be loaded in at the very end of Kickflip's KickflipServiceProvider::boot()method. Read more about this idea directly on the Laravel Docs under Sharing Data With All Views.