Download the PHP package pwweb/laravel-core without Composer
On this page you can find all versions of the php package pwweb/laravel-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-core
Laravel Core Package
Core: Additional core functionalities for Laravel including the Localisation: C3P0 for Laravel. Take a look at contributing.md to see a to do list.
Installation
Via Composer run the following:
Pre-requisites
The package assumes a standard Laravel installation if the bundled default controllers for the entities are to be used. The bundled controllers extend from App\Http\Controllers\Controller
. If other, custom base controllers are used as part of the installation, refer to Customising.
Configuration
Customising
The package provides the following tags for publishing individual components for customising:
Tag | Description |
---|---|
pwweb.core.config |
Publish the configuration files to e.g. adjust database table names. |
pwweb.core.migrations |
Publish the migration file(s) to make alterations to the database tables. |
pwweb.core.language |
Publish the language files to make adjustments to the translation strings. |
pwweb.core.views |
Publish the view files to make adjustments to the overall structure of the views. |
Extending Models
Models can be extended to include additional functionalities or add relationships to other models. When doing so, the configuration for this package needs to be exported and the class names need to be adjusted accordingly.
Default and Fallback Language
It is recommended to change your app.php
to use both the ISO-639-1 ISO Language Code as well as the ISO-3166 ISO Country Code. This can be achieved by changing the following two variables:
3rd Party Dependencies
This package relies on a few other packages. You should review their documentation as well:
Usage
Users and Persons
In order to use the user and person model, rather than the default user model provided out of Laravel, the auth.php
configuration file needs to be modified to the following:
Using Laravel Auth
If the default laravel authentication is used and the controllers have been published, some changes are necessary to the RegisterController.php
.
Addresses
The package provides a trait HasAddresses
which can be used to allow models to be associated with addresses.
Language Switcher
The localisation package provides a language switcher that can easily be added to blade templates as follows (note: the <div>
is exemplary):
GraphQL
The package provides a graphql.schema
file for use within your parent project. This can be included in your primary schema
file as follows:
Note: don't forget to update the vendor path should yours be in a different location, relative to your primary schema file.
Blade Directives
@date
The date directive allows for the display and formatting of dates using Carbon\Carbon
. In case no date is supplied (i.e. null
), no error is thrown and an empty string returned.
If no format is supplied, the default format from configuration is used.
@menu
˜ The menu directive allows for the display of a menu based on the environment and root node provided.
Exchange Rates
The package has an exchange_rates
table that can be used to hold the historic exchange rates. To automatically update the table, a Queueable Job has been provided. This can be used with Laravel's Task Scheduling to update on a regular basis.
N.B.: The rates are taken from the European Central Bank and they update their rates daily at about 16:00 CET. Therefore you should ensure that the task is run shortly after to get the latest rates.
If you want to see the original content of the file you can find it here.
FAQs
During install via composer you get the following messages:
This is due to the command php artisan config:cache
has been run. We suggest you delete the cache file bootstrap/cache/config.php
and then run composer dump-autoload
to be sure.
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todo list.
Security
If you discover any security related issues, please use the issue tracker.
Credits
- PW*Websolutions
- All Contributors
License
Copyright © pw-websolutions.com. Please see the license file for more information.
All versions of laravel-core with dependencies
laravel/framework Version ^8.24.0 || ^9.0 || ^10.0
laravel/socialite Version ^5.0
laracasts/flash Version ^3.2.1
spatie/laravel-enum Version ^2.2 || ^3.0
spatie/laravel-medialibrary Version ^9.0 || ^10.0
spatie/laravel-permission Version ^5.0
kalnoy/nestedset Version ^5.0 || ^6.0