koraycicekciogullari / hydro-core
A hydro core
1.0.7
2022-02-28 08:17 UTC
Requires
- php: >=8.0
- illuminate/support: ^8.0|^9.0
- koraycicekciogullari/hydro-administrator: ^1.0
- koraycicekciogullari/hydro-contact: ^1.0
- koraycicekciogullari/hydro-page: ^1.0
- koraycicekciogullari/hydro-permission: ^1.0
- koraycicekciogullari/hydro-slider: ^1.0
- koraycicekciogullari/hydro-social: ^1.0
- spatie/laravel-analytics: ^4.1
- spatie/laravel-medialibrary: ^10.0.4
- spatie/laravel-permission: ^5.5.0
- spatie/laravel-sluggable: ^3.3
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0|^6.0
- phpunit/phpunit: ^8.4|^9.0
README
Installation
Install via composer
composer require koraycicekciogullari/hydro-core
Publish package assets
php artisan vendor:publish --provider="Koraycicekciogullari\HydroCore\ServiceProvider"
Update the files below.
cors.php File Must Be Replaced.
'supports_credentials' => true,
auth.php File Must Be Replaced.
use Koraycicekciogullari\HydroAdministrator\Models\User; 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'api' => [ 'driver' => 'token', 'provider' => 'users', 'hash' => false, ], ],
Kernel.php File Must Be Replaced.
'api' => [ \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 'throttle:api', \Illuminate\Routing\Middleware\SubstituteBindings::class, ], protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, 'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class, 'role_or_permission' => \Spatie\Permission\Middlewares\RoleOrPermissionMiddleware::class, ];
.env File Must Be Replaced.
FILESYSTEM_DRIVER=media
SESSION_DRIVER=cookie
ANALYTICS_VIEW_ID=
GOOGLE_RECAPTCHA_SECRET_KEY=
MEDIA_DISK="media"
composer.json File Must Be Replaced.
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:meta",
"@php artisan ide-helper:models --write-mixin"
],
Add config/values.php
<?php return [ 'google_recaptcha_secret_key' => env('GOOGLE_RECAPTCHA_SECRET_KEY') ];
AuthServiceProvider.php File Must Be Replaced.
Gate::before(function ($user, $ability) { return $user->hasRole('root') ? true : null; });
Installation Steps
The commands below are run sequentially.
php artisan vendor:publish --provider="Spatie\Analytics\AnalyticsServiceProvider" php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="migrations" php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="config" php artisan storage:link php artisan optimize php artisan migrate php artisan hydro:install