Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Main Laravel Package

chill-project/main

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation Clone the mirror repo and install via Composer:

    composer create-project chill-project/main chill-app
    cd chill-app
    composer install
    
  2. Laravel Integration Add the package to config/app.php under providers:

    'providers' => [
        // ...
        Chill\Main\Providers\ChillServiceProvider::class,
    ],
    

    Publish the config:

    php artisan vendor:publish --provider="Chill\Main\Providers\ChillServiceProvider" --tag="config"
    
  3. First Use Case Run migrations and seed the database:

    php artisan migrate --seed
    

    Access the admin panel at /admin (default credentials: [email protected] / password).


Implementation Patterns

Core Workflows

  1. Social-Profit Features

    • User Roles: Extend Chill\Main\Models\User with custom traits for roles (e.g., Organizer, Volunteer):
      use Chill\Main\Traits\HasOrganizerRole;
      
      class CustomUser extends User {
          use HasOrganizerRole;
      }
      
    • Event Management: Use Chill\Main\Events\Event model for CRUD operations:
      $event = Event::create([
          'title' => 'Community Cleanup',
          'organizer_id' => auth()->id(),
          'start_at' => now()->addDays(7),
      ]);
      
  2. API Integration

    • Leverage built-in API routes (e.g., /api/events) with Laravel Sanctum for authentication:
      Route::middleware('auth:sanctum')->get('/api/events', [EventController::class, 'index']);
      
  3. Frontend Templates

    • Extend Blade templates in resources/views/vendor/chill to customize UI:
      @extends('chill::layouts.app')
      @section('content')
          {{ $slot }}
      @endsection
      

Common Patterns

  • Service Containers: Inject Chill\Main\Services\EventService for business logic:
    public function __construct(private EventService $eventService) {}
    
  • Observers: Hook into model events (e.g., EventObserver for notifications):
    Event::observe(EventObserver::class);
    

Gotchas and Tips

Pitfalls

  1. Database Schema

    • The package assumes a PostgreSQL-compatible schema. For MySQL, override migrations in database/migrations/chill_* with MySQL syntax.
    • Fix: Use DB::connection()->getDoctrineSchemaManager() for schema-agnostic queries.
  2. Deprecated Methods

    • Some methods (e.g., User::getChillRoles()) may be renamed. Check chill.php config for aliases.
  3. Caching Quirks

    • Aggressive caching in Chill\Main\Services\CacheService can cause stale data. Clear cache after model updates:
      php artisan chill:clear-cache
      

Debugging Tips

  • Log Configuration: Enable debug mode in chill.php:
    'debug' => env('APP_DEBUG', true),
    
  • Event Listeners: Use php artisan chill:listeners to inspect registered listeners.

Extension Points

  1. Custom Models Override core models by publishing and extending:

    php artisan vendor:publish --provider="Chill\Main\Providers\ChillServiceProvider" --tag="models"
    

    Example:

    namespace App\Models;
    
    use Chill\Main\Models\Event as BaseEvent;
    
    class Event extends BaseEvent {
        protected $table = 'custom_events';
    }
    
  2. API Resources Extend Chill\Main\Http\Resources\EventResource for custom fields:

    public function toArray($request) {
        return array_merge(parent::toArray($request), [
            'custom_field' => $this->custom_field,
        ]);
    }
    
  3. Middleware Add custom middleware to app/Http/Kernel.php:

    protected $routeMiddleware = [
        'chill.auth' => \Chill\Main\Http\Middleware\Authenticate::class,
        'custom.chill' => \App\Http\Middleware\CustomChillMiddleware::class,
    ];
    
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin