Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@ APP_FALLBACK_LOCALE=fr
APP_PORT=8080
APP_SERVICE=laravelcm

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single,nightwatch
LOG_LEVEL=debug
LOG_SOCKET_URL=buggregator:9913

# Ray Configuration
RAY_HOST=ray@buggregator
RAY_PORT=8000
# Sentry
SENTRY_LARAVEL_DSN=http://sentry@buggregator:8000/1
SENTRY_TRACES_SAMPLE_RATE=1.0
#Var Dumper
VAR_DUMPER_FORMAT=server
VAR_DUMPER_SERVER=tcp://buggregator:9912
# Inspector
INSPECTOR_URL=http://inspector@buggregator:8000
INSPECTOR_API_KEY=test
INSPECTOR_INGESTION_KEY=1test
Expand All @@ -34,8 +41,7 @@ DB_PASSWORD=password

BROADCAST_DRIVER=log
MEDIA_DISK=media
FILESYSTEM_DISK=${MEDIA_DISK}
FILAMENT_FILESYSTEM_DISK=${MEDIA_DISK}
FILESYSTEM_DISK="${MEDIA_DISK}"
FILAMENT_PATH=cpanel

QUEUE_CONNECTION=database
Expand Down
1 change: 0 additions & 1 deletion .env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ SENTRY_LARAVEL_DSN=
INSPECTOR_ENABLE=false

BCRYPT_ROUNDS=4
VIEW_COMPILED_PATH=/tmp/views
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ composer.phar
/public/build
/public/hot
/public/storage
/public/fonts
/public/media
/public/css
/public/js
Expand Down
7 changes: 2 additions & 5 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"mcpServers": {
"laravel-boost": {
"command": "php",
"args": [
"artisan",
"boost:mcp"
]
"command": "./vendor/bin/sail",
"args": ["php", "artisan", "boost:mcp"]
}
}
}
77 changes: 57 additions & 20 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
## Foundational Context
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.

- php - 8.4.12
- filament/filament (FILAMENT) - v3
- php - 8.4.10
- filament/filament (FILAMENT) - v4
- laravel/framework (LARAVEL) - v12
- laravel/nightwatch (NIGHTWATCH) - v1
- laravel/octane (OCTANE) - v2
- laravel/prompts (PROMPTS) - v0
- laravel/socialite (SOCIALITE) - v5
- livewire/livewire (LIVEWIRE) - v3
- livewire/volt (VOLT) - v1
- larastan/larastan (LARASTAN) - v3
- laravel/breeze (BREEZE) - v2
- laravel/mcp (MCP) - v0
- laravel/pint (PINT) - v1
- laravel/sail (SAIL) - v1
- pestphp/pest (PEST) - v3
- phpunit/phpunit (PHPUNIT) - v11
- rector/rector (RECTOR) - v2
- alpinejs (ALPINEJS) - v3
- prettier (PRETTIER) - v3
- tailwindcss (TAILWINDCSS) - v3
- tailwindcss (TAILWINDCSS) - v4


## Conventions
Expand Down Expand Up @@ -201,19 +204,25 @@ Forms\Components\Select::make('user_id')
</code-snippet>


=== filament/v3 rules ===
=== filament/v4 rules ===

## Filament 3
## Filament 4

## Version 3 Changes To Focus On
- Resources are located in `app/Filament/Resources/` directory.
- Resource pages (List, Create, Edit) are auto-generated within the resource's directory - e.g., `app/Filament/Resources/PostResource/Pages/`.
- Forms use the `Forms\Components` namespace for form fields.
- Tables use the `Tables\Columns` namespace for table columns.
- A new `Filament\Forms\Components\RichEditor` component is available.
- Form and table schemas now use fluent method chaining.
- Added `php artisan filament:optimize` command for production optimization.
- Requires implementing `FilamentUser` contract for production access control.
### Important Version 4 Changes
- File visibility is now `private` by default.
- The `deferFilters` method from Filament v3 is now the default behavior in Filament v4, so users must click a button before the filters are applied to the table. To disable this behavior, you can use the `deferFilters(false)` method.
- The `Grid`, `Section`, and `Fieldset` layout components no longer span all columns by default.
- The `all` pagination page method is not available for tables by default.
- All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`.
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
- A new `Repeater` component for Forms has been added.
- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented.

### Organize Component Classes Structure
- Schema components: `Schemas/Components/`
- Table columns: `Tables/Columns/`
- Table filters: `Tables/Filters/`
- Actions: `Actions/`


=== laravel/core rules ===
Expand Down Expand Up @@ -288,7 +297,7 @@ Forms\Components\Select::make('user_id')

## Livewire Core
- Use the `search-docs` tool to find exact version specific documentation for how to write Livewire & Livewire tests.
- Use the `php artisan make:livewire [Posts\\CreatePost]` artisan command to create new components
- Use the `php artisan make:livewire [Posts\CreatePost]` artisan command to create new components
- State should live on the server, with the UI reflecting it.
- All Livewire requests hit the Laravel backend, they're like regular HTTP requests. Always validate form data, and run authorization checks in Livewire actions.

Expand All @@ -305,7 +314,7 @@ Forms\Components\Select::make('user_id')
@endforeach
```

- Prefer lifecycle hooks like `mount()`, `updatedFoo()`) for initialization and reactive side effects:
- Prefer lifecycle hooks like `mount()`, `updatedFoo()` for initialization and reactive side effects:

<code-snippet name="Lifecycle hook examples" lang="php">
public function mount(User $user) { $this->user = $user; }
Expand Down Expand Up @@ -564,11 +573,39 @@ it('has emails', function (string $email) {
- If existing pages and components support dark mode, new pages and components must support dark mode in a similar way, typically using `dark:`.


=== tailwindcss/v3 rules ===
=== tailwindcss/v4 rules ===

## Tailwind 4

- Always use Tailwind CSS v4 - do not use the deprecated utilities.
- `corePlugins` is not supported in Tailwind v4.
- In Tailwind v4, you import Tailwind using a regular CSS `@import` statement, not using the `@tailwind` directives used in v3:

<code-snippet name="Tailwind v4 Import Tailwind Diff" lang="diff">
- @tailwind base;
- @tailwind components;
- @tailwind utilities;
+ @import "tailwindcss";
</code-snippet>


## Tailwind 3
### Replaced Utilities
- Tailwind v4 removed deprecated utilities. Do not use the deprecated option - use the replacement.
- Opacity values are still numeric.

- Always use Tailwind CSS v3 - verify you're using only classes supported by this version.
| Deprecated | Replacement |
|------------+--------------|
| bg-opacity-* | bg-black/* |
| text-opacity-* | text-black/* |
| border-opacity-* | border-black/* |
| divide-opacity-* | divide-black/* |
| ring-opacity-* | ring-black/* |
| placeholder-opacity-* | placeholder-black/* |
| flex-shrink-* | shrink-* |
| flex-grow-* | grow-* |
| overflow-ellipsis | text-ellipsis |
| decoration-slice | box-decoration-slice |
| decoration-clone | box-decoration-clone |


=== tests rules ===
Expand All @@ -577,4 +614,4 @@ it('has emails', function (string $email) {

- Every change must be programmatically tested. Write a new test or update an existing test, then run the affected tests to make sure they pass.
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test` with a specific filename or filter.
</laravel-boost-guidelines>
</laravel-boost-guidelines>
6 changes: 3 additions & 3 deletions app-modules/gamify/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"version": "1.1.0",
"license": "proprietary",
"require": {
"filament/filament": "^3.2"
"php": "^8.4"
},
"require-dev": {
"pestphp/pest": "^2.32",
"pestphp/pest-plugin-laravel": "^2.1"
"pestphp/pest": "^3.8",
"pestphp/pest-plugin-laravel": "^3.0"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 1 addition & 9 deletions app-modules/gamify/src/Models/Reputation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* @property-read int $id
* @property int $point
* @property-read int $point
* @property-read User|null $payee
* @property-read \Illuminate\Support\Carbon $created_at
* @property-read \Illuminate\Support\Carbon $updated_at
Expand All @@ -28,19 +28,11 @@ public function payee(): BelongsTo
return $this->belongsTo(config('gamify.payee_model'), 'payee_id'); // @phpstan-ignore-line
}

/**
* Get the owning subject model
*/
public function subject(): MorphTo
{
return $this->morphTo();
}

/**
* Undo last point
*
* @throws \Exception
*/
public function undo(): void
{
if ($this->exists) {
Expand Down
Loading
Loading