PHP code example of iml885203 / laravel5-tinx
1. Go to this page and download the library: Download iml885203/laravel5-tinx library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
iml885203 / laravel5-tinx example snippets
// 'config/app.php'
return [
// etc…
'providers' => [
// etc…
iml885203\Laravel5Tinx\TinxServiceProvider::class,
// etc…
],
// etc…
];
// 'config/tinx.php'
return [
/**
* Base paths to search for models (paths ending in '*' search recursively).
* */
'model_paths' => [
'/app',
'/app/Models/*',
// '/also/search/this/directory',
// '/also/search/this/directory/recursively/*',
],
/**
* Only define these models (all other models will be ignored).
* */
'only' => [
// 'App\OnlyThisModel',
// 'App\AlsoOnlyThisModel',
],
/**
* Ignore these models.
* */
'except' => [
// 'App\IgnoreThisModel',
// 'App\AlsoIgnoreThisModel',
],
/**
* Model shortcut naming strategy (e.g. 'App\User' = '$u', '$u_', 'u()').
* Supported values: 'pascal', 'shortestUnique'
* */
'strategy' => 'pascal',
/**
* Alternatively, you may pass a resolvable fully qualified class name
* implementing 'iml885203\Laravel5Tinx\Naming\Strategy'.
* */
// 'strategy' => App\CustomNamingStrategy::class,
/**
* Column name (e.g. 'id', 'created_at') used to determine last model shortcut (i.e. '$u_').
* */
'latest_column' => 'created_at',
/**
* If true, models without database tables will also have shortcuts defined.
* */
'tableless_models' => false,
/**
* Include these file(s) before starting tinker.
* */
'
php artisan tinx
names(['car', 'user'])
php artisan vendor:publish --provider="iml885203\Laravel5Tinx\TinxServiceProvider" --tag="config"