laravel-custom-casts
Make your own custom cast type for Laravel model attributes
File Explorer
Download Latest Version (.zip)- Dockerfile
- bug_report.md
- feature_request.md
- custom_casts.php
- CustomCastBase.php
- CustomCastsServiceProvider.php
- HasCustomCasts.php
- helpers.php
- 0000_00_00_000000_create_package_test_tables.php
- CanHandleModelEventsTest.php
- MiscTest.php
- ModelWithAliasedCustomCastsTest.php
- ModelWithCustomCastsTest.php
- ModelWithDefaultValueForCustomCastFieldTest.php
- ModelWithNullableCustomCastFieldTest.php
- Base64Cast.php
- EventHandlingCast.php
- ModelWithAliasedCustomCasts.php
- ModelWithCustomCasts.php
- ModelWithDefaultValue.php
- ModelWithDefaultValueForCustomCasts.php
- ModelWithEventHandlingCast.php
- ModelWithMutatorAndCustomCasts.php
- ModelWithNullableValueForCustomCasts.php
- TestCase.php
- .gitignore
- .travis.yml
- composer.json
- docker-compose.yml
- LICENCE
- phpunit.xml
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/vkovic/laravel-custom-casts
Downloads the entire project code from GitHub to your computer.
cd laravel-custom-casts
Moves into the project folder you just downloaded.
2. Docker
Easy RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker-compose up --exit-code-from app
Runs the command against the services defined in the compose file.
docker-compose run --rm app phpunit
Runs the command against the services defined in the compose file.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
Pulled directly from this repo's README.
3. PHP (Composer)
EasyPrerequisites
composer require vkovic/laravel-custom-casts
Type this command into your terminal and run it.
Run it with a built-in server like php -S localhost:8000, then open http://localhost:8000 in your browser.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
