sudobee / cygnus
There is no license information available for the latest version (dev-master) of this package.
dev-master
2022-04-17 11:24 UTC
Requires
- php: ^8.1
- ext-json: *
- giggsey/libphonenumber-for-php: ^8.12.46
- illuminate/contracts: ^9.8.1
- inertiajs/inertia-laravel: ^0.5.4
- spatie/laravel-package-tools: ^1.11.3
This package is auto-updated.
Last update: 2025-02-27 15:12:28 UTC
README
Installation
- Clone into project
git clone git@github.com:sudobeecom/cygnus.git
- Add repository to project
"repositories": [ { "type": "path", "url": "./cygnus" } ],
- Require new package
"require": { "sudobee/cygnus": "*" },
- Update packages using composer
composer update
- Publish/re-publish assets
rm -rf public/vendor/cygnus php artisan vendor:publish --tag=cygnus-assets
- Add
app.blade.php
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="overflow-y-scroll"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>{{ config('app.name', 'Laravel') }}</title> <!-- Fonts --> <link rel="stylesheet" href="{{ asset('fonts/inter/inter.css') }}" /> <link rel="stylesheet" href="/vendor/cygnus/index.css"> <script src="/vendor/cygnus/index.js" defer></script> <style> :root { --cygnus-primary-50: 239 246 255; --cygnus-primary-100: 219 234 254; --cygnus-primary-200: 191 219 254; --cygnus-primary-300: 147 197 253; --cygnus-primary-400: 96 165 250; --cygnus-primary-500: 59 130 246; --cygnus-primary-600: 37 99 235; --cygnus-primary-700: 29 78 216; --cygnus-primary-800: 30 64 175; --cygnus-primary-900: 30 58 138; } </style> </head> <body class="antialiased font-base"> @inertia </body> </html>
- Add to AppServiceProvider boot() method
Inertia::share([ "baseUrl" => fn() => URL::to("/"), "applicationName" => fn() => env("APP_NAME"), "notification" => fn() => Notification::getAndClear(), "resetFormIdentifier" => fn() => Session::get( "resetFormIdentifier" ), "csrfToken" => fn() => csrf_token(), ]);
- Add to HandleInertiaRequests share() method
/** @var User|null $user */ $user = auth()->check() ? auth()->user() : null; return array_merge(parent::share($request), [ "user" => $user?->only("email", "name"), "balance" => null, ]);
- Add to RouteServiceProvider getHomepage() method
public static function getHomepage(): string { return self::HOME; }
Update
Run inside your project directory:
git submodule update --remote --merge