Thorin is a pretty simple toolkit that gives you a lot of cool helpers functions in multiple areas like:
- App
- Array
- Cache
- Cast
- Collection
- Color
- Config
- Datetime
- DB
- Event
- Filesystem
- Function
- Hook
- i18n
- Image
- Is
- Media
- Object
- Path
- Recaptcha
- Security
- Session
- String
- Url
- Util
- Vendor
- View
The main goal of this toolkit is to give you some nice and powerful features through a simple API. We will make this package grow every time we encounter and implement some nice functions/classes/helpers.
composer require dwarvesforge/thorin
You can install the Thorin Visual Studio Code Snippets Extension to help you using the package.
To start using Thorin you have two choices. The first is the simplier the second the harder.
Create the files/folders structure described bellow and start using Thorin with his full power right now:
- | .env
- | app
- |--- cache
- |------- views
- |--- config
- |--- lang
- |------- en
- |--- views
- | public (document root)
- |--- dist
The second solution require that you set the various configurations by yourself if you need another folders structure. To do so, you'll need first:
First choice, using the .env file at the root of your project
T_CONFIG_PATH=/something/absolute/to/the/server/root/
Or by defining a constant like so BEFORE loading Thorin:
define('T_CONFIG_PATH', '/something/absolute/to/the/server/root/');The default value for this config is app/config/
To do so, you'll need to create some config files to override the default configs that you can find here:
- Application config :
app/config/app.php - Cache config :
app/config/cache.php - DB config :
app/config/db.php - Email config :
app/config/email.php - Filesystem config :
app/config/filesystem.php - i18n config :
app/config/i18n.php - Image config :
app/config/image.php - Path config :
app/config/path.php - Recaptcha config :
app/config/recaptcha.php - Session config :
app/config/session.php
To override some config, simply create a file with the same name in your config folder and override it inside this file.
The .env file can contains a set of environment variables. Here's the file that document them:
- Example :
.env.example
Dwarvesforge is an open source project and will ever be! You are more that welcomed to contribute to his development and make it more awesome every day. To do so, you have several possibilities:
The code is available under the MIT license. This mean that you can use, modify, or do whatever you want with it. This mean also that it is shipped to you for free, so don't be a hater and if you find some issues, etc... feel free to contribute instead of sharing your frustrations on social networks like an asshole...
We try to be some cool guys that build some cool tools to make our (and yours hopefully) every day life better.
