Download the PHP package mdkieran/inscribed without Composer

On this page you can find all versions of the php package mdkieran/inscribed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package inscribed

Inscribed

Share your Laravel constants with JavaScript.

About

This lightweight Laravel package makes it easy to share your application's constants, config values, and other static data with your frontend in an organized and efficient way. The data is "inscribed" onto the browser's window object, where it lives for the lifecycle of the page.

During development, the @inscribed blade directive will output something like:

During production, so that the browser can benefit from caching, you'll see something like:

Additionally, there's a JavaScript helper function that you can publish to your project which helps you to retrieve the window object's "inscribed" data.

Features

This package allows you to:

Installation

[1/5] Composer

[2/5] Publish an example class

The following command will publish App\Inscribed\ExampleInscribed.php to your project:

[3/5] Register the example class

Open up a Service Provider class and add the following:

[4/5] Include the blade directive

Include the blade directive in your layout file.

Once you've included the blade directive, you should be able to type window.Inscribed into your browser's console and see the data from ExampleInscribed. That's pretty much it, you're all set.

[5/5] Publish the JavaScript helper (Optional)

The following command will publish resources/js/inscribed.js to your project, which can help you to easily retrieve the "inscribed" data. You may integrate it into your project as you wish:

Caching

To prepare your app for production or the local environment you can run:

Note: After running either of the above commands you will need to run: php artisan view:clear to ensure the new markup can be included.

Or if you prefer, there's integration with Laravel's optimize commands so you could also run:

How does caching work?

Caching works by taking each "Inscribed" class that you have in your project and making a JavaScript file for it that holds all of the static data that the class returned. Once done, we then make the file bootstrap/cache/inscribed.php which stores the list of JavaScript files that we just made.

The blade directive looks for bootstrap/cache/inscribed.php, if it finds it then it fetches the list of JavaScript files (from within it) and prints out script tags for each one. If it doesn't find bootstrap/cache/inscribed.php then it instantiates each of your inscribed classes to produce inline JavaScript that holds your static data.


All versions of inscribed with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version >=11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mdkieran/inscribed contains the following files

Loading the files please wait ...