https://github.com/reliqarts/laravel-common
Reliq Arts' base/common classes and functions for Laravel
https://github.com/reliqarts/laravel-common
base common laravel non-www redirect reliqarts shared www
Last synced: 8 months ago
JSON representation
Reliq Arts' base/common classes and functions for Laravel
- Host: GitHub
- URL: https://github.com/reliqarts/laravel-common
- Owner: reliqarts
- License: mit
- Created: 2017-09-04T00:31:05.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T11:30:01.000Z (over 1 year ago)
- Last Synced: 2025-04-09T14:05:53.296Z (about 1 year ago)
- Topics: base, common, laravel, non-www, redirect, reliqarts, shared, www
- Language: PHP
- Homepage: https://reliqarts.com
- Size: 137 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Common
Reliq Arts' base/common classes and functions for Laravel 6+.
[](http://laravel.com)
[](https://github.com/reliqarts/laravel-common/actions/workflows/test.yml)
[](https://codeclimate.com/github/reliqarts/laravel-common/maintainability)
[](https://codecov.io/gh/reliqarts/laravel-common)
[](https://packagist.org/packages/reliqarts/laravel-common)
[](https://packagist.org/packages/reliqarts/laravel-common)
[](//packagist.org/packages/reliqarts/laravel-common)
## Features/Contents
- Config provider implementation
- uses `Illuminate\Contracts\Config\Repository`
- allows easy access to config keys under specific (package) 'namespace'
- `Illuminate\Filesystem` implementation
- Specifically changing the behaviour of `deleteDirectory()`
- [Monolog](https://github.com/Seldaek/monolog) Logger
- Result Object (simple DTO)
- Version Provider
- Sitemap generation command
- via Spatie's [Laravel Sitemap](https://github.com/spatie/laravel-sitemap)
- NonWWW middleware: Tiny middleware to redirect all www requests to non-www counterparts.
## Installation & Use
Install via composer:
```php
composer require reliqarts/laravel-common
```
Add service provider:
```php
ReliqArts\ServiceProvider::class,
```
Use anywhere throughout your application. e.g.
```php
$versionProvider = resolve(ReliqArts\Contract\VersionProvider::class);
$versionProvider->getVersion();
```
Use NonWWW middleware in Kernel. i.e.
```php
'web' => [
// ...
\ReliqArts\NonWWW\Http\Middleware\NonWWW::class,
// ...
],
```
All done! :beers: