dhandarbeit-tk / laravel-boilerplate-platform
The Laravel Framework.
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.1.3
- caouecs/laravel-lang: ~3.0
- doctrine/dbal: ^2.9
- fideloper/proxy: ^4.0
- laravel/framework: 5.7.*
- laravel/tinker: ^1.0
- laravelcollective/html: ^5.7
- vinkla/hashids: ^5.1
Requires (Dev)
- barryvdh/laravel-ide-helper: ^2.5
- beyondcode/laravel-dump-server: ^1.0
- filp/whoops: ^2.0
- fzaninotto/faker: ^1.4
- mockery/mockery: ^1.0
- nunomaduro/collision: ^2.0
- phpunit/phpunit: ^7.0
This package is not auto-updated.
Last update: 2024-12-05 01:30:37 UTC
README
Provides useful helper functions and class structure for core functionality of laravel/laravel.
Built to be customizable.
Installation
Create project
composer create-project dhandarbeit-tk/laravel-boilerplate-platform
Preinstalled packages
- HTML and Form Builder laravelcollective/html
- doctrine/dbal
- Laravel IDE Helper barryvdh/laravel-ide-helper
- registered for dev env only (via AppServiceProvider)
- caouecs/laravel-lang
- Hashids bridge vinkla/hashids
New Defaults
- LOG_CHANNEL=daily
- database.migrations=laravel_migrations
- queue.database.table=laravel_jobs
- queue.failed.table=laravel_failed_jobs
Other defaults:
- app.locale=de
- app.timezone=Europe/Berlin
Directories
- app/Support
- app/Eloquent/Models
- app/Eloquent/Collections
Helper Functions
(app/Support/helpers.php)
- array_ensured($array, $data)
- return $array, containing all keys of data, and value if $array doesnt have the key
- user()
- shorthand for auth()->user()
- decodeHashid($connection, $encoded, $default)
- returns decoded hashid of $encoded for $connection; if not possible, return $default
- encodeHashid($connection, $decoded)
- returns encoded hashid of $decoded for $connection
- isCurrentRelease()
- determines if running release is most recent release (useful for deployment related things)
Customizable classes and methods
-
App\Eloquent\Models\Model (trait: IsModel)
- is($model = null) (overwrite)
- allows argument to be null (returns false)
- isClass($class)
- is($model = null) (overwrite)
-
App\Eloquent\Models\Traits\HasTimestamps
- updateTimestamps() (overwrite)
- only sets updated_at when updating, not when creating
- updateTimestamps() (overwrite)
-
App\Eloquent\Models\Pivots\Pivot (trait: IsPivot)
-
App\Support\Collection (trait: CollectionTrait)
- implode($value, $glue = null, $skipNull = false) (overwrite)
- allows to skip null
- implode($value, $glue = null, $skipNull = false) (overwrite)
-
App\Eloquent\Collections\Collection (trait: CollectionTrait)
- without($model = null)
- return a new Collection without $model
- eachDelete()
- runs delete() on each model
- eachAppends($attributes)
- runs appends($attributes) on each model
- without($model = null)
Stubs
- artisan make:model
- (app/Console/stubs/model.stub)
- prefills table name
- has predefined areas for relationships