Download the PHP package mindedge/blade without Composer
On this page you can find all versions of the php package mindedge/blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mindedge/blade
More information about mindedge/blade
Files in mindedge/blade
Package blade
Short Description A standalone blade package that implementents a mini IoC container, and binds Illiminate\view to it
License
Informations about the package blade
Mindedge Blade
Composer package that provides Laravels IOC Container, which any laravel service can be bound to. This package currently provides the following services out of the box:
-
Illuminate\view - Github Link, Illuminate Api Documentation
This is the service thats provides the blade engine.
-
Illuminate\config - Github Link, Illuminate Api Documentation
This is the service that allows services to have dedicated, easy to understand configuration files.
-
Illuminate\database - Github Link, Illuminate Api Documentation
This is the service that provides database services such as Eloquent.
The package is now hosted on packagist, which means adding the repository array is not longer nessisary.
https://packagist.org/packages/mindedge/blade
Installation
You can use the below require statement from the command line in the root directory (assuming a composer.json already exists):
Alternativly, simply add to existing dependency to "require" object in composer.json,
And then run
Configuration:
Within the root directory of of your app, create four directories. I have used the "ROOTDIR" to denote the application root.
- ROOTDIR/bootrap
- ROOTDIR/config
- ROOTDIR/cache
- ROOTDIR/views
Note: the 'views' directory will correspond to wherever your application holds its presentation layer files and is configurable. You may name/change the views directory to whatever makes sense for your application.
You should wind up with something like this:
In the newly crated boostrap directory, create a single file named app.php, with the below conents.
Note:
If you do not plan on using the view, database, or config facades, you may comment '$app->withFacades out'.
To use eloquent, Simply uncomment '$app->withEloquent'. If using you plan on using Models, make sure to add a psr4 entry in your composer.json to thier location.
This example shows the autoload script being included, but as long as vendor/autoload.php is included somewhere in the project thats globally accessable, thats a fine approach as well.
In the newly created config directory, create a single file named view.php, and place the following starter config:
This config file configures the View library (Blade) and contains an array with two keys.
-
'paths' - Represents where the Illuminate\view service should look for files. Accepted file types for this directory are .php and .blade.php. You may add as my locations to the paths array as you like.
- 'compiled' - Represents where the compiled/resolved views should go. If the a given file hasnt changed, View will skip the complication step and read the compiled contents of the corresponding file from this folder. Make sure this folder is writable by the application/web user.
Add another config file, for the Database library (including eloquent). Inside the config directory create a single file named database.php, and place the following starter config:
All database configuration values should be defined in .env files, with a localhost default backup defined in the config file if nessisary. More information reguarding configuration can be found on the Official Laravel Docs Site
Assuming all above steps were followed correctly, you should have a directory structure that looks something simliar to this:
Include boostrap/app.php in you applications entry point, somewhere thats is globally included or autoloaded, and uou are now ready to use all three services this package provides.
For further help and documenation, see the below links:
Additional Services
-
Service Providers - This package allows you to register additional services and bind them into the IoC container via a Provider. To register a service, call the register method in the bootstrap/app file. The service class file, and the service provider file must live in a location that is psr4 autoloaded.
-
Facades - If you've created a facade for you're own service, or want to register the facade that came with a different package, you may doing so by passing the references into the 'withFacades' method. The class you are registering a facade for must live in a directory that is psr4 autoloaded.
- Config Files - If you've created a custom service, and want to use a config file, or are using a 3rd party package that uses config file, you may create and register it with the application. In your config directory, create or import the config file. To register the config with the application, use the configure method.
All versions of blade with dependencies
illuminate/config Version 5.8.*
illuminate/database Version 5.8.*
illuminate/pagination Version 5.8.*