mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Move to new repo
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Alpine
|
||||
# Filament
|
||||
|
||||
A lightweight admin for your Laravel app.
|
||||
|
||||
@@ -20,20 +20,20 @@ cd [appName]
|
||||
### Install the package via composer
|
||||
|
||||
```bash
|
||||
composer install madewithalpine/alpine # See note below
|
||||
composer install filament/filament # See note below
|
||||
php artisan migrate
|
||||
```
|
||||
|
||||
> ToDo: Add to Packagist (for now you will need to clone and [symlink the package](https://calebporzio.com/bash-alias-composer-link-use-local-folders-as-composer-dependancies)).
|
||||
|
||||
Add the necessary `Alpine\Traits\AlpineUser` trait to your `App\User` model.
|
||||
Add the necessary `Filament\Traits\FilamentUser` trait to your `App\User` model.
|
||||
|
||||
### Create a user
|
||||
|
||||
```bash
|
||||
php artisan alpine:user
|
||||
php artisan filament:user
|
||||
```
|
||||
|
||||
## Upgrading
|
||||
|
||||
There are no special requirements for upgrading, other than `changing ^x.xx` version in your composer.json and running `composer update` as well as `php artisan migrate`. _Your app must meet the minimum requirements as well_.
|
||||
There are no special requirements for upgrading, other than changing `^x.xx` version in your composer.json and running `composer update` as well as `php artisan migrate`.
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "madewithalpine/alpine",
|
||||
"name": "filament/filament",
|
||||
"description": "A lightweight admin for your Laravel app.",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
@@ -8,7 +8,7 @@
|
||||
"tailwindui",
|
||||
"alpine.js"
|
||||
],
|
||||
"homepage": "https://madewithalpine.com",
|
||||
"homepage": "https://github.com/eastslopestudio/filament",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
@@ -29,16 +29,16 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Alpine\\": "src"
|
||||
"Filament\\": "src"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Alpine\\AlpineServiceProvider"
|
||||
"Filament\\FilamentServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Alpine": "Alpine\\AlpineFacade"
|
||||
"Filament": "Filament\\FilamentFacade"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7,35 +7,35 @@ return [
|
||||
| Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the name used by Alpine.
|
||||
| This is the name used by Filament.
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('ALPINE_NAME', 'Alpine'),
|
||||
'name' => env('FILAMENT_NAME', 'Filament'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base Route Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the URI path where Alpine will be accessible from.
|
||||
| This is the URI path where Filament will be accessible from.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => env('ALPINE_PATH_NAME', 'cp'),
|
||||
'path' => env('FILAMENT_PATH_NAME', 'cp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redirects
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the URI path where Alpine will be accessible from.
|
||||
| This is the URI path where Filament will be accessible from.
|
||||
|
|
||||
*/
|
||||
|
||||
'redirects' => [
|
||||
|
||||
'admin' => 'alpine.admin.dashboard', // string or named route to redirect users when successfully authenticated.
|
||||
'admin' => 'filament.admin.dashboard', // string or named route to redirect users when successfully authenticated.
|
||||
|
||||
],
|
||||
|
||||
@@ -44,7 +44,7 @@ return [
|
||||
| Navigation
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Navigations used by Alpine.
|
||||
| Navigations used by Filament.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -53,22 +53,22 @@ return [
|
||||
'admin' => [
|
||||
|
||||
'dashboard' => [
|
||||
'label' => 'alpine::admin.dashboard',
|
||||
'icon' => 'heroicons/outline-md/md-home', // path to SVG icon using Alpine::svg() helper
|
||||
'url' => 'alpine.admin.dashboard', // string or named route
|
||||
'active' => 'alpine.admin.dashboard', // string or named route (may also be an array @link https://github.com/dwightwatson/active)
|
||||
'label' => 'filament::admin.dashboard',
|
||||
'icon' => 'heroicons/outline-md/md-home', // path to SVG icon using Filament::svg() helper
|
||||
'url' => 'filament.admin.dashboard', // string or named route
|
||||
'active' => 'filament.admin.dashboard', // string or named route (may also be an array @link https://github.com/dwightwatson/active)
|
||||
],
|
||||
|
||||
/* TODO
|
||||
|
||||
'Resources' => [
|
||||
'label' => 'alpine::admin.resources',
|
||||
'label' => 'filament::admin.resources',
|
||||
'icon' => 'heroicons/outline-md/md-collection',
|
||||
'url' => '#',
|
||||
],
|
||||
|
||||
'globals' => [
|
||||
'label' => 'alpine::admin.globals',
|
||||
'label' => 'filament::admin.globals',
|
||||
'icon' => 'heroicons/outline-md/md-globe',
|
||||
'url' => '#',
|
||||
],
|
||||
@@ -76,20 +76,20 @@ return [
|
||||
*/
|
||||
|
||||
'users' => [
|
||||
'label' => 'alpine::admin.users',
|
||||
'label' => 'filament::admin.users',
|
||||
'icon' => 'heroicons/outline-md/md-user-group',
|
||||
'url' => 'alpine.admin.users.index',
|
||||
'active' => 'alpine.admin.users.*',
|
||||
'url' => 'filament.admin.users.index',
|
||||
'active' => 'filament.admin.users.*',
|
||||
'ability' => 'view users',
|
||||
],
|
||||
|
||||
/* TODO
|
||||
|
||||
'Permissions' => [
|
||||
'label' => 'alpine::admin.permissions',
|
||||
'label' => 'filament::admin.permissions',
|
||||
'icon' => 'heroicons/outline-md/md-lock-closed',
|
||||
'url' => 'alpine.admin.permissions.index',
|
||||
'active' => 'alpine.admin.permissions.*',
|
||||
'url' => 'filament.admin.permissions.index',
|
||||
'active' => 'filament.admin.permissions.*',
|
||||
'ability' => 'view permissions',
|
||||
],
|
||||
|
||||
@@ -104,12 +104,12 @@ return [
|
||||
| Models
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Eloquent Models used by Alpine.
|
||||
| The Eloquent Models used by Filament.
|
||||
|
|
||||
*/
|
||||
|
||||
'models' => [
|
||||
// 'resource' => Alpine\Models\Resource::class,
|
||||
// 'resource' => Filament\Models\Resource::class,
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -117,7 +117,7 @@ return [
|
||||
| Route Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These middleware will be attached to every route type in Alpine.
|
||||
| These middleware will be attached to every route type in Filament.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -135,12 +135,12 @@ return [
|
||||
| Storage
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the storage disk Alpine will use to put file uploads, you may
|
||||
| This is the storage disk Filament will use to put file uploads, you may
|
||||
| use any of the disks defined in the `config/filesystems.php`.
|
||||
|
|
||||
*/
|
||||
|
||||
'storage_disk' => env('ALPINE_STORAGE_DISK', 'local'),
|
||||
'storage_path' => env('ALPINE_STORAGE_PATH', 'public/alpine'),
|
||||
'storage_disk' => env('FILAMENT_STORAGE_DISK', 'local'),
|
||||
'storage_path' => env('FILAMENT_STORAGE_PATH', 'public/filament'),
|
||||
|
||||
];
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "alpine",
|
||||
"name": "filament",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@extends('alpine::layouts.auth')
|
||||
@extends('filament::layouts.auth')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
@extends('alpine::layouts.auth')
|
||||
@extends('filament::layouts.auth')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
@section('main')
|
||||
|
||||
<x-alpine-form :action="route('alpine.auth.login')">
|
||||
<x-filament-form :action="route('filament.auth.login')">
|
||||
|
||||
<x-alpine-alert :type="session('alert.type')" :message="session('alert.message')" />
|
||||
<x-filament-alert :type="session('alert.type')" :message="session('alert.message')" />
|
||||
|
||||
<x-alpine-input-group id="email" label="E-Mail Address" required>
|
||||
<x-alpine-input id="email" type="email" name="email" autocomplete="email" autofocus required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group id="email" label="E-Mail Address" required>
|
||||
<x-filament-input id="email" type="email" name="email" autocomplete="email" autofocus required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-input-group id="password" label="Password" required>
|
||||
<x-filament-input-group id="password" label="Password" required>
|
||||
<x-slot name="hint">
|
||||
<a href="{{ route('alpine.auth.password.forgot') }}">{{ __('Forgot Your Password?') }}</a>
|
||||
<a href="{{ route('filament.auth.password.forgot') }}">{{ __('Forgot Your Password?') }}</a>
|
||||
</x-slot>
|
||||
<x-alpine-input id="password" type="password" name="password" autocomplete="current-password" required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input id="password" type="password" name="password" autocomplete="current-password" required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-input-group>
|
||||
<x-alpine-checkbox name="remember" label="Remember Me" />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group>
|
||||
<x-filament-checkbox name="remember" label="Remember Me" />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-button label="Login" class="w-full" />
|
||||
<x-filament-button label="Login" class="w-full" />
|
||||
|
||||
</x-alpine-form>
|
||||
</x-filament-form>
|
||||
|
||||
@endsection
|
||||
@@ -1,23 +1,23 @@
|
||||
@extends('alpine::layouts.auth')
|
||||
@extends('filament::layouts.auth')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
@section('main')
|
||||
|
||||
<x-alpine-form :action="route('alpine.auth.password.email')">
|
||||
<x-filament-form :action="route('filament.auth.password.email')">
|
||||
|
||||
<x-alpine-alert type="success" :message="session('status')" />
|
||||
<x-filament-alert type="success" :message="session('status')" />
|
||||
|
||||
<x-alpine-input-group id="email" label="E-Mail Address" required>
|
||||
<x-alpine-input id="email" type="email" name="email" autocomplete="email" autofocus required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group id="email" label="E-Mail Address" required>
|
||||
<x-filament-input id="email" type="email" name="email" autocomplete="email" autofocus required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-button label="Send Password Reset Link" class="w-full" />
|
||||
<x-filament-button label="Send Password Reset Link" class="w-full" />
|
||||
|
||||
<x-slot name="hint">
|
||||
<a href="{{ route('alpine.auth.login') }}">← {{ __('Back to Login') }}</a>
|
||||
<a href="{{ route('filament.auth.login') }}">← {{ __('Back to Login') }}</a>
|
||||
</x-slot>
|
||||
|
||||
</x-alpine-form>
|
||||
</x-filament-form>
|
||||
|
||||
@endsection
|
||||
@@ -1,31 +1,31 @@
|
||||
@extends('alpine::layouts.auth')
|
||||
@extends('filament::layouts.auth')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
@section('main')
|
||||
|
||||
<x-alpine-form :action="route('alpine.auth.password.update')">
|
||||
<x-filament-form :action="route('filament.auth.password.update')">
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}" required />
|
||||
|
||||
<x-alpine-input-group id="email" label="E-Mail Address" required>
|
||||
<x-alpine-input id="email" type="email" name="email" :value="$email" autocomplete="email" autofocus required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group id="email" label="E-Mail Address" required>
|
||||
<x-filament-input id="email" type="email" name="email" :value="$email" autocomplete="email" autofocus required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-input-group id="password" label="Password" required>
|
||||
<x-alpine-input id="password" type="password" name="password" autocomplete="new-password" required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group id="password" label="Password" required>
|
||||
<x-filament-input id="password" type="password" name="password" autocomplete="new-password" required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-input-group id="password-confirm" label="Confirm Password" required>
|
||||
<x-alpine-input id="password-confirm" type="password" name="password_confirmation" autocomplete="new-password" required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group id="password-confirm" label="Confirm Password" required>
|
||||
<x-filament-input id="password-confirm" type="password" name="password_confirmation" autocomplete="new-password" required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-button label="Reset Password" class="w-full" />
|
||||
<x-filament-button label="Reset Password" class="w-full" />
|
||||
|
||||
<x-slot name="hint">
|
||||
<a href="{{ route('alpine.auth.login') }}">← {{ __('Back to Login') }}</a>
|
||||
<a href="{{ route('filament.auth.login') }}">← {{ __('Back to Login') }}</a>
|
||||
</x-slot>
|
||||
|
||||
</x-alpine-form>
|
||||
</x-filament-form>
|
||||
|
||||
@endsection
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
<button @click="open = false">
|
||||
<span aria-hidden="true">
|
||||
{{ Alpine::svg('heroicons/outline-md/md-x', 'w-auto h-5 fill-current')}}
|
||||
{{ Filament::svg('heroicons/outline-md/md-x', 'w-auto h-5 fill-current')}}
|
||||
</span>
|
||||
<span class="sr-only">{{ __('Close') }}</span>
|
||||
</button>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{{ $attributes }} />
|
||||
@error($name)
|
||||
<div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
|
||||
{{ Alpine::svg('heroicons/solid-sm/sm-exclamation-circle', 'h-5 w-5 text-red-500') }}
|
||||
{{ Filament::svg('heroicons/solid-sm/sm-exclamation-circle', 'h-5 w-5 text-red-500') }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@extends('alpine::layouts.admin')
|
||||
@extends('filament::layouts.admin')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@extends('alpine::layouts.app', ['classes' => ['body' => '']])
|
||||
@extends('filament::layouts.app', ['classes' => ['body' => '']])
|
||||
|
||||
@section('content')
|
||||
<div class="h-screen flex overflow-hidden bg-gray-100" x-data="{ sidebarOpen: false }" @keydown.window.escape="sidebarOpen = false">
|
||||
@@ -8,20 +8,20 @@
|
||||
<div class="fixed inset-y-0 left-0 flex flex-col z-40 max-w-xs w-full bg-gray-800 transform ease-in-out duration-300 -translate-x-full" :class="{'translate-x-0': sidebarOpen, '-translate-x-full': !sidebarOpen}">
|
||||
<div class="absolute top-0 right-0 -mr-14 p-1">
|
||||
<button x-show="sidebarOpen" @click="sidebarOpen = false" class="flex items-center justify-center h-12 w-12 rounded-full focus:outline-none focus:bg-gray-600">
|
||||
{{ Alpine::svg('heroicons/outline-md/md-x', 'h-6 w-6 text-white') }}
|
||||
{{ Filament::svg('heroicons/outline-md/md-x', 'h-6 w-6 text-white') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="h-0 flex-1 overflow-y-auto pt-5 pb-4">
|
||||
<div class="flex-shrink-0 flex items-center px-4">
|
||||
@include('alpine::partials.logo', ['classes' => 'h-8 w-auto rounded-full mr-4'])
|
||||
@include('filament::partials.logo', ['classes' => 'h-8 w-auto rounded-full mr-4'])
|
||||
<h2 class="text-xl leading-5 font-bold text-gray-200">
|
||||
{{ config('app.name') }}
|
||||
</h2>
|
||||
</div>
|
||||
@includeWhen(config('alpine.nav.admin'), 'alpine::partials.nav', ['nav' => config('alpine.nav.admin')])
|
||||
@includeWhen(config('filament.nav.admin'), 'filament::partials.nav', ['nav' => config('filament.nav.admin')])
|
||||
</div>
|
||||
<div class="flex-shrink-0 flex bg-gray-700 p-4">
|
||||
@include('alpine::partials.user-actions')
|
||||
@include('filament::partials.user-actions')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,15 +30,15 @@
|
||||
<div class="flex flex-col w-64 bg-gray-800">
|
||||
<div class="h-0 flex-1 flex flex-col pt-5 pb-4 overflow-y-auto">
|
||||
<div class="flex items-center flex-shrink-0 px-4">
|
||||
@include('alpine::partials.logo', ['classes' => 'h-8 w-auto rounded-full mr-4'])
|
||||
@include('filament::partials.logo', ['classes' => 'h-8 w-auto rounded-full mr-4'])
|
||||
<h2 class="text-xl leading-5 font-bold text-gray-200">
|
||||
{{ config('app.name') }}
|
||||
</h2>
|
||||
</div>
|
||||
@includeWhen(config('alpine.nav.admin'), 'alpine::partials.nav', ['nav' => config('alpine.nav.admin')])
|
||||
@includeWhen(config('filament.nav.admin'), 'filament::partials.nav', ['nav' => config('filament.nav.admin')])
|
||||
</div>
|
||||
<div class="flex-shrink-0 flex bg-gray-700 p-4">
|
||||
@include('alpine::partials.user-actions')
|
||||
@include('filament::partials.user-actions')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="flex flex-col w-0 flex-1 overflow-hidden">
|
||||
<div class="md:hidden pl-1 pt-1 sm:pl-3 sm:pt-3">
|
||||
<button @click.stop="sidebarOpen = true" class="-ml-0.5 -mt-0.5 h-12 w-12 inline-flex items-center justify-center rounded-md text-gray-500 hover:text-gray-900 focus:outline-none focus:bg-gray-200 transition ease-in-out duration-150">
|
||||
{{ Alpine::svg('heroicons/outline-md/md-menu-alt-1', 'h-6 w-6') }}
|
||||
{{ Filament::svg('heroicons/outline-md/md-menu-alt-1', 'h-6 w-6') }}
|
||||
</button>
|
||||
</div>
|
||||
<main class="flex-1 relative z-0 overflow-y-auto focus:outline-none" tabindex="0" x-data x-init="$el.focus()">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<title>@yield('title') • {{ config('app.name') }}</title>
|
||||
@livewireStyles
|
||||
@alpineAssets
|
||||
@filamentAssets
|
||||
@stack('head')
|
||||
</head>
|
||||
<body class="font-sans antialiased text-gray-900
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@extends('alpine::layouts.app', ['classes' => ['body' => 'min-h-screen bg-gray-50 flex flex-col justify-center px-4 py-12 sm:px-6 lg:px-8']])
|
||||
@extends('filament::layouts.app', ['classes' => ['body' => 'min-h-screen bg-gray-50 flex flex-col justify-center px-4 py-12 sm:px-6 lg:px-8']])
|
||||
|
||||
@section('content')
|
||||
<main class="sm:mx-auto sm:w-full sm:max-w-md">
|
||||
@include('alpine::partials.logo', ['classes' => 'mx-auto w-16 h-16 rounded-full'])
|
||||
@include('filament::partials.logo', ['classes' => 'mx-auto w-16 h-16 rounded-full'])
|
||||
<h2 class="mt-4 text-center text-3xl leading-9 font-extrabold text-gray-900">
|
||||
@yield('title')
|
||||
</h2>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<form wire:submit.prevent="update">
|
||||
|
||||
<x-alpine-alert :type="session('alert.type')" :message="session('alert.message')" />
|
||||
<x-filament-alert :type="session('alert.type')" :message="session('alert.message')" />
|
||||
|
||||
<x-alpine-input-group wire:key="input-name" id="name" label="Name" required>
|
||||
<x-alpine-input id="name" name="name" wire:model="name" required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group wire:key="input-name" id="name" label="Name" required>
|
||||
<x-filament-input id="name" name="name" wire:model="name" required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-input-group wire:key="input-email" id="email" label="E-Mail Address" required>
|
||||
<x-alpine-input id="email" type="email" name="email" wire:model="email" required />
|
||||
</x-alpine-input-group>
|
||||
<x-filament-input-group wire:key="input-email" id="email" label="E-Mail Address" required>
|
||||
<x-filament-input id="email" type="email" name="email" wire:model="email" required />
|
||||
</x-filament-input-group>
|
||||
|
||||
<x-alpine-button wire:key="input-submit" label="Update" />
|
||||
<x-filament-button wire:key="input-submit" label="Update" />
|
||||
|
||||
</form>
|
||||
@@ -2,8 +2,8 @@
|
||||
<ul class="mb-6 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
||||
@foreach ($users as $user)
|
||||
<li wire:key="{{ $user->id }}" class="flex">
|
||||
<a class="flex-grow p-4 bg-white shadow-sm rounded-md flex items-center" href="{{ route('alpine.admin.users.edit', ['user' => $user->id]) }}">
|
||||
@livewire('alpine::user-avatar', [
|
||||
<a class="flex-grow p-4 bg-white shadow-sm rounded-md flex items-center" href="{{ route('filament.admin.users.edit', ['user' => $user->id]) }}">
|
||||
@livewire('filament::user-avatar', [
|
||||
'user' => $user,
|
||||
'size' => 96,
|
||||
'classes' => 'h-12 w-12 rounded-full'
|
||||
@@ -19,5 +19,5 @@
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
{{ $users->links('alpine::partials.links') }}
|
||||
{{ $users->links('filament::partials.links') }}
|
||||
</div>
|
||||
@@ -3,12 +3,12 @@
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-400" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
{{ Alpine::svg('heroicons/solid-sm/sm-cheveron-left', 'h-5 w-5') }}
|
||||
{{ Filament::svg('heroicons/solid-sm/sm-cheveron-left', 'h-5 w-5') }}
|
||||
</li>
|
||||
@else
|
||||
<li>
|
||||
<button type="button" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-500 hover:text-gray-400 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" wire:click="previousPage" rel="prev" aria-label="@lang('pagination.previous')">
|
||||
{{ Alpine::svg('heroicons/solid-sm/sm-cheveron-left', 'h-5 w-5') }}
|
||||
{{ Filament::svg('heroicons/solid-sm/sm-cheveron-left', 'h-5 w-5') }}
|
||||
</button>
|
||||
</li>
|
||||
@endif
|
||||
@@ -44,12 +44,12 @@
|
||||
@if ($paginator->hasMorePages())
|
||||
<li>
|
||||
<button type="button" class="-ml-px relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-500 hover:text-gray-400 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" wire:click="nextPage" rel="next" aria-label="@lang('pagination.next')">
|
||||
{{ Alpine::svg('heroicons/solid-sm/sm-cheveron-right', 'h-5 w-5') }}
|
||||
{{ Filament::svg('heroicons/solid-sm/sm-cheveron-right', 'h-5 w-5') }}
|
||||
</button>
|
||||
</li>
|
||||
@else
|
||||
<li class="-ml-px relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-400" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
{{ Alpine::svg('heroicons/solid-sm/sm-cheveron-right', 'h-5 w-5') }}
|
||||
{{ Filament::svg('heroicons/solid-sm/sm-cheveron-right', 'h-5 w-5') }}
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
{{ Alpine::svg('logo', $classes ?? '') }}
|
||||
{{ Filament::svg('logo', $classes ?? '') }}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@endisset
|
||||
>
|
||||
@if (isset($item['icon']))
|
||||
{{ Alpine::svg($item['icon'], 'mr-3 h-6 w-6 text-gray-400') }}
|
||||
{{ Filament::svg($item['icon'], 'mr-3 h-6 w-6 text-gray-400') }}
|
||||
@endif
|
||||
{{ __($item['label']) }}
|
||||
</a>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div @click.away="open = false" class="relative" x-data="{ open: false }">
|
||||
<button @click="open = !open" class="flex items-center">
|
||||
@livewire('alpine::user-avatar', [
|
||||
@livewire('filament::user-avatar', [
|
||||
'user' => auth()->user(),
|
||||
'size' => 36,
|
||||
'classes' => 'h-9 w-9 rounded-full'
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="rounded-md bg-white shadow-xs">
|
||||
<p class="px-4 py-3">
|
||||
<span class="block text-sm leading-5">
|
||||
{{ __('alpine::admin.signed_in_as') }}
|
||||
{{ __('filament::admin.signed_in_as') }}
|
||||
</span>
|
||||
<span class="text-sm leading-5 font-medium text-gray-900">
|
||||
{{ auth()->user()->email }}
|
||||
@@ -21,15 +21,15 @@
|
||||
</p>
|
||||
<div class="border-t border-gray-100"></div>
|
||||
<div class="py-1">
|
||||
<a href="{{ route('alpine.admin.users.edit', ['user' => auth()->user()->id]) }}" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ __('alpine::admin.account_settings') }}</a>
|
||||
<a href="{{ route('filament.admin.users.edit', ['user' => auth()->user()->id]) }}" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ __('filament::admin.account_settings') }}</a>
|
||||
</div>
|
||||
<div class="border-t border-gray-100"></div>
|
||||
<div class="py-1">
|
||||
<x-alpine-form :action="route('alpine.auth.logout')">
|
||||
<x-filament-form :action="route('filament.auth.logout')">
|
||||
<button type="submit" class="block w-full text-left px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">
|
||||
{{ __('Sign Out') }}
|
||||
</button>
|
||||
</x-alpine-form>
|
||||
</x-filament-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('alpine::layouts.admin')
|
||||
@extends('filament::layouts.admin')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
@section('main')
|
||||
<div class="max-w-xl bg-white py-8 px-4 shadow rounded-md sm:px-10">
|
||||
@livewire('alpine::user-edit-form', ['user' => $user])
|
||||
@livewire('filament::user-edit-form', ['user' => $user])
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,7 +1,7 @@
|
||||
@extends('alpine::layouts.admin')
|
||||
@extends('filament::layouts.admin')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
@section('main')
|
||||
@livewire('alpine::users')
|
||||
@livewire('filament::users')
|
||||
@endsection
|
||||
+1
-1
@@ -15,7 +15,7 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
|
||||
// protected routes...
|
||||
Route::middleware('auth.alpine:api')->group(function () {
|
||||
Route::middleware('auth.filament:api')->group(function () {
|
||||
|
||||
// curl -H "Accept: application/json" -X GET http://localhost:8000/cp/api/user
|
||||
Route::get('/user', function (Request $request) {
|
||||
|
||||
+3
-3
@@ -16,8 +16,8 @@ use Illuminate\Support\Facades\Route;
|
||||
// asset routes...
|
||||
Route::name('assets.')->group(function () {
|
||||
|
||||
Route::get('alpine.css', 'AssetController@css')->name('css');
|
||||
Route::get('alpine.js', 'AssetController@js')->name('js');
|
||||
Route::get('filament.css', 'AssetController@css')->name('css');
|
||||
Route::get('filament.js', 'AssetController@js')->name('js');
|
||||
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ Route::name('auth.')->namespace('Auth')->group(function () {
|
||||
});
|
||||
|
||||
// protected admin routes...
|
||||
Route::name('admin.')->middleware('auth.alpine')->group(function () {
|
||||
Route::name('admin.')->middleware('auth.filament')->group(function () {
|
||||
|
||||
Route::get('/', 'DashboardController')->name('dashboard');
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Commands;
|
||||
namespace Filament\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Alpine\Traits\ConsoleValidation;
|
||||
use Alpine\Contracts\User as UserContract;
|
||||
use Filament\Traits\ConsoleValidation;
|
||||
use Filament\Contracts\User as UserContract;
|
||||
|
||||
class CreateUserCommand extends Command
|
||||
{
|
||||
@@ -15,7 +15,7 @@ class CreateUserCommand extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'alpine:user';
|
||||
protected $signature = 'filament:user';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -53,8 +53,8 @@ class CreateUserCommand extends Command
|
||||
'is_super_admin' => $superAdmin,
|
||||
]);
|
||||
|
||||
$appName = config('alpine.name');
|
||||
$loginURL = route('alpine.auth.login');
|
||||
$appName = config('filament.name');
|
||||
$loginURL = route('filament.auth.login');
|
||||
$this->info("Success! You may now login to {$appName} ( {$loginURL} ) with user `{$user->name}`.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Contracts;
|
||||
namespace Filament\Contracts;
|
||||
|
||||
interface User
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine;
|
||||
namespace Filament;
|
||||
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class Alpine {
|
||||
class Filament {
|
||||
|
||||
/**
|
||||
* `base` path
|
||||
@@ -52,13 +52,13 @@ class Alpine {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user has requested an alpine path.
|
||||
* Check if user has requested an filament path.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function handling()
|
||||
{
|
||||
return preg_match('#^'.config('alpine.path').'($|/)'.'#i', Request::path());
|
||||
return preg_match('#^'.config('filament.path').'($|/)'.'#i', Request::path());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,12 +73,12 @@ class Alpine {
|
||||
parse_str(parse_url($manifest['/js/app.js'], PHP_URL_QUERY), $jsInfo);
|
||||
|
||||
return new HtmlString('
|
||||
<!-- Alpine Styles -->
|
||||
<!-- Filament Styles -->
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||
<link rel="stylesheet" href="'.route('alpine.assets.css', $cssInfo).'" />
|
||||
<link rel="stylesheet" href="'.route('filament.assets.css', $cssInfo).'" />
|
||||
|
||||
<!-- Alpine Scripts -->
|
||||
<script src="'.route('alpine.assets.js', $jsInfo).'" defer></script>
|
||||
<!-- Filament Scripts -->
|
||||
<script src="'.route('filament.assets.js', $jsInfo).'" defer></script>
|
||||
');
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine;
|
||||
namespace Filament;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
class AlpineFacade extends Facade
|
||||
class FilamentFacade extends Facade
|
||||
{
|
||||
protected static function getFacadeAccessor()
|
||||
{
|
||||
return 'alpine';
|
||||
return 'filament';
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine;
|
||||
namespace Filament;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\File;
|
||||
@@ -8,15 +8,15 @@ use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Events\Dispatcher;
|
||||
use Livewire\Livewire;
|
||||
use Alpine\Support\ServiceProvider;
|
||||
use Alpine\Providers\AuthServiceProvider;
|
||||
use Alpine\Support\BladeDirectives;
|
||||
use Alpine\Contracts\User as UserContract;
|
||||
use Alpine\Traits\EventMap;
|
||||
use Alpine\Http\Middleware\Authenticate;
|
||||
use Alpine\Commands\CreateUserCommand;
|
||||
use Filament\Support\ServiceProvider;
|
||||
use Filament\Providers\AuthServiceProvider;
|
||||
use Filament\Support\BladeDirectives;
|
||||
use Filament\Contracts\User as UserContract;
|
||||
use Filament\Traits\EventMap;
|
||||
use Filament\Http\Middleware\Authenticate;
|
||||
use Filament\Commands\CreateUserCommand;
|
||||
|
||||
class AlpineServiceProvider extends ServiceProvider
|
||||
class FilamentServiceProvider extends ServiceProvider
|
||||
{
|
||||
use EventMap;
|
||||
|
||||
@@ -59,7 +59,7 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerSingeltons()
|
||||
{
|
||||
$this->app->singleton('alpine', Alpine::class);
|
||||
$this->app->singleton('filament', Filament::class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,9 +69,9 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->mergeConfigFrom($this->packagePath.'config/alpine.php', 'alpine');
|
||||
if ($this->app['alpine']->handling()) {
|
||||
// $this->mergeFromConfig('existing-package-config', $this->app['config']->get('alpine.existing-package-config', []));
|
||||
$this->mergeConfigFrom($this->packagePath.'config/filament.php', 'filament');
|
||||
if ($this->app['filament']->handling()) {
|
||||
// $this->mergeFromConfig('existing-package-config', $this->app['config']->get('filament.existing-package-config', []));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
protected function registerBindings()
|
||||
{
|
||||
$this->app->bind(UserContract::class, config('auth.providers.users.model'));
|
||||
// $this->app->bind(ResourceContract::class, config('alpine.models.resource'));
|
||||
// $this->app->bind(ResourceContract::class, config('filament.models.resource'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,7 +134,7 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerMiddleware()
|
||||
{
|
||||
Route::aliasMiddleware('auth.alpine', Authenticate::class);
|
||||
Route::aliasMiddleware('auth.filament', Authenticate::class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,17 +144,17 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerRoutes()
|
||||
{
|
||||
$namespace = 'Alpine\Http\Controllers';
|
||||
$name = 'alpine.';
|
||||
$namespace = 'Filament\Http\Controllers';
|
||||
$name = 'filament.';
|
||||
|
||||
Route::middleware(config('alpine.middleware.web'))
|
||||
->prefix(config('alpine.path'))
|
||||
Route::middleware(config('filament.middleware.web'))
|
||||
->prefix(config('filament.path'))
|
||||
->namespace($namespace)
|
||||
->name($name)
|
||||
->group($this->packagePath.'routes/web.php');
|
||||
|
||||
Route::middleware(config('alpine.middleware.api'))
|
||||
->prefix(config('alpine.path').'/api')
|
||||
Route::middleware(config('filament.middleware.api'))
|
||||
->prefix(config('filament.path').'/api')
|
||||
->namespace($namespace)
|
||||
->name($name)
|
||||
->group($this->packagePath.'routes/api.php');
|
||||
@@ -167,7 +167,7 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerResources()
|
||||
{
|
||||
$this->loadViewsFrom($this->packagePath.'resources/views', 'alpine');
|
||||
$this->loadViewsFrom($this->packagePath.'resources/views', 'filament');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,7 +177,7 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerTranslations()
|
||||
{
|
||||
$this->loadTranslationsFrom($this->packagePath.'resources/lang', 'alpine');
|
||||
$this->loadTranslationsFrom($this->packagePath.'resources/lang', 'filament');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,8 +201,8 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
{
|
||||
if ($this->app->runningInConsole()) {
|
||||
$this->publishes([
|
||||
$this->packagePath.'config/alpine.php' => config_path('alpine.php'),
|
||||
], 'alpine-config');
|
||||
$this->packagePath.'config/filament.php' => config_path('filament.php'),
|
||||
], 'filament-config');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,12 +214,12 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
public function registerBlade()
|
||||
{
|
||||
// Register package directives
|
||||
Blade::directive('alpineAssets', [BladeDirectives::class, 'alpineAssets']);
|
||||
Blade::directive('filamentAssets', [BladeDirectives::class, 'filamentAssets']);
|
||||
|
||||
// Automatically register package components
|
||||
foreach (File::glob(__DIR__.'/Http/Components/*.php') as $path) {
|
||||
$baseName = basename($path, '.php');
|
||||
Blade::component("\\Alpine\\Http\\Components\\{$baseName}", 'alpine-'.Str::of($baseName)->kebab());
|
||||
Blade::component("\\Filament\\Http\\Components\\{$baseName}", 'filament-'.Str::of($baseName)->kebab());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ class AlpineServiceProvider extends ServiceProvider
|
||||
// Automatically register package components
|
||||
foreach (File::glob(__DIR__.'/Http/Livewire/*.php') as $path) {
|
||||
$baseName = basename($path, '.php');
|
||||
Livewire::component('alpine::'.Str::of($baseName)->kebab(), "\\Alpine\\Http\\Livewire\\{$baseName}");
|
||||
Livewire::component('filament::'.Str::of($baseName)->kebab(), "\\Filament\\Http\\Livewire\\{$baseName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Components;
|
||||
namespace Filament\Http\Components;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
@@ -40,6 +40,6 @@ class Alert extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::components.alert');
|
||||
return view('filament::components.alert');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Components;
|
||||
namespace Filament\Http\Components;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
@@ -40,6 +40,6 @@ class Button extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::components.button');
|
||||
return view('filament::components.button');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Components;
|
||||
namespace Filament\Http\Components;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
@@ -56,6 +56,6 @@ class Checkbox extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::components.checkbox');
|
||||
return view('filament::components.checkbox');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Components;
|
||||
namespace Filament\Http\Components;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
@@ -56,6 +56,6 @@ class Form extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::components.form');
|
||||
return view('filament::components.form');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Components;
|
||||
namespace Filament\Http\Components;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
@@ -56,6 +56,6 @@ class Input extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::components.input');
|
||||
return view('filament::components.input');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Components;
|
||||
namespace Filament\Http\Components;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
@@ -57,6 +57,6 @@ class InputGroup extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::components.input-group');
|
||||
return view('filament::components.input-group');
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Controllers;
|
||||
namespace Filament\Http\Controllers;
|
||||
|
||||
use Alpine;
|
||||
use Filament;
|
||||
|
||||
class AssetController
|
||||
{
|
||||
@@ -18,7 +18,7 @@ class AssetController
|
||||
|
||||
protected function pretendResponseIsFile($file, $contentType)
|
||||
{
|
||||
$path = Alpine::distPath($file);
|
||||
$path = Filament::distPath($file);
|
||||
|
||||
if (!file_exists($path)) {
|
||||
abort(404);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Controllers\Auth;
|
||||
namespace Filament\Http\Controllers\Auth;
|
||||
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Alpine\Http\Controllers\Controller;
|
||||
use Filament\Http\Controllers\Controller;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
@@ -18,6 +18,6 @@ class ForgotPasswordController extends Controller
|
||||
{
|
||||
$title = __('Reset Password');
|
||||
|
||||
return view('alpine::auth.passwords.email', compact('title'));
|
||||
return view('filament::auth.passwords.email', compact('title'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Controllers\Auth;
|
||||
namespace Filament\Http\Controllers\Auth;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
use Alpine\Http\Controllers\Controller;
|
||||
use Filament\Http\Controllers\Controller;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
@@ -19,7 +19,7 @@ class LoginController extends Controller
|
||||
*/
|
||||
protected function redirectTo()
|
||||
{
|
||||
$redirect = config('alpine.redirects.admin');
|
||||
$redirect = config('filament.redirects.admin');
|
||||
|
||||
return Route::has($redirect) ? route($redirect) : $redirect;
|
||||
}
|
||||
@@ -37,9 +37,9 @@ class LoginController extends Controller
|
||||
return redirect($this->redirectTo());
|
||||
}
|
||||
|
||||
$title = __('alpine::auth.login', ['name' => config('app.name')]);
|
||||
$title = __('filament::auth.login', ['name' => config('app.name')]);
|
||||
|
||||
return view('alpine::auth.login', compact('title'));
|
||||
return view('filament::auth.login', compact('title'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,9 +62,9 @@ class LoginController extends Controller
|
||||
|
||||
return $request->wantsJson()
|
||||
? new Response('', 204)
|
||||
: redirect(route('alpine.auth.login'))->with('alert', [
|
||||
: redirect(route('filament.auth.login'))->with('alert', [
|
||||
'type' => 'success',
|
||||
'message' => __('alpine::auth.logout'),
|
||||
'message' => __('filament::auth.logout'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Controllers\Auth;
|
||||
namespace Filament\Http\Controllers\Auth;
|
||||
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use Illuminate\Http\Request;
|
||||
use Alpine\Http\Controllers\Controller;
|
||||
use Filament\Http\Controllers\Controller;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
@@ -15,7 +15,7 @@ class ResetPasswordController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectRouteName = 'alpine.auth.login';
|
||||
protected $redirectRouteName = 'filament.auth.login';
|
||||
|
||||
/**
|
||||
* Where to redirect users after resetting their password.
|
||||
@@ -41,7 +41,7 @@ class ResetPasswordController extends Controller
|
||||
$title = __('Reset Password');
|
||||
$email = $request->email;
|
||||
|
||||
return view('alpine::auth.passwords.reset', compact('title', 'email', 'token'));
|
||||
return view('filament::auth.passwords.reset', compact('title', 'email', 'token'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Controllers;
|
||||
namespace Filament\Http\Controllers;
|
||||
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
@@ -21,6 +21,6 @@ class Controller extends BaseController
|
||||
{
|
||||
$title = 404;
|
||||
|
||||
return view('alpine::404', compact('title'));
|
||||
return view('filament::404', compact('title'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Controllers;
|
||||
namespace Filament\Http\Controllers;
|
||||
|
||||
use App\User;
|
||||
|
||||
@@ -13,8 +13,8 @@ class DashboardController extends Controller
|
||||
*/
|
||||
public function __invoke()
|
||||
{
|
||||
$title = __('alpine::admin.dashboard');
|
||||
$title = __('filament::admin.dashboard');
|
||||
|
||||
return view('alpine::dashboard', compact('title'));
|
||||
return view('filament::dashboard', compact('title'));
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Controllers;
|
||||
namespace Filament\Http\Controllers;
|
||||
|
||||
use Alpine\Contracts\User as UserContract;
|
||||
use Filament\Contracts\User as UserContract;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
@@ -16,9 +16,9 @@ class UserController extends Controller
|
||||
{
|
||||
$this->authorize('view', app(UserContract::class));
|
||||
|
||||
$title = __('alpine::admin.users');
|
||||
$title = __('filament::admin.users');
|
||||
|
||||
return view('alpine::users.index', compact('title'));
|
||||
return view('filament::users.index', compact('title'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,8 +34,8 @@ class UserController extends Controller
|
||||
|
||||
$this->authorize('edit', $user);
|
||||
|
||||
$title = __('alpine::admin.user_edit', ['name' => $user->name]);
|
||||
$title = __('filament::admin.user_edit', ['name' => $user->name]);
|
||||
|
||||
return view('alpine::users.edit', compact('title', 'user'));
|
||||
return view('filament::users.edit', compact('title', 'user'));
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Livewire;
|
||||
namespace Filament\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
@@ -21,6 +21,6 @@ class UserAvatar extends Component
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::livewire.user-avatar');
|
||||
return view('filament::livewire.user-avatar');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Livewire;
|
||||
namespace Filament\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
use Illuminate\Validation\Rule;
|
||||
@@ -40,6 +40,6 @@ class UserEditForm extends Component
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('alpine::livewire.user-edit-form');
|
||||
return view('filament::livewire.user-edit-form');
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Livewire;
|
||||
namespace Filament\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use Alpine\Contracts\User as UserContract;
|
||||
use Filament\Contracts\User as UserContract;
|
||||
|
||||
class Users extends Component
|
||||
{
|
||||
@@ -14,7 +14,7 @@ class Users extends Component
|
||||
{
|
||||
$userModel = app(UserContract::class);
|
||||
|
||||
return view('alpine::livewire.users', [
|
||||
return view('filament::livewire.users', [
|
||||
'users' => $userModel::paginate(2),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Http\Middleware;
|
||||
namespace Filament\Http\Middleware;
|
||||
|
||||
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
||||
|
||||
@@ -15,7 +15,7 @@ class Authenticate extends Middleware
|
||||
protected function redirectTo($request)
|
||||
{
|
||||
if (! $request->expectsJson()) {
|
||||
return route('alpine.auth.login');
|
||||
return route('filament.auth.login');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Notifications;
|
||||
namespace Filament\Notifications;
|
||||
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
@@ -66,7 +66,7 @@ class ResetPassword extends Notification
|
||||
if (static::$createUrlCallback) {
|
||||
$url = call_user_func(static::$createUrlCallback, $notifiable, $this->token);
|
||||
} else {
|
||||
$url = url(config('app.url').route('alpine.auth.password.reset', [
|
||||
$url = url(config('app.url').route('filament.auth.password.reset', [
|
||||
'token' => $this->token,
|
||||
'email' => $notifiable->getEmailForPasswordReset(),
|
||||
], false));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Policies;
|
||||
namespace Filament\Policies;
|
||||
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Providers;
|
||||
namespace Filament\Providers;
|
||||
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
@@ -16,7 +16,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
// Package policy discovery logic
|
||||
Gate::guessPolicyNamesUsing(function ($modelClass) {
|
||||
return 'Alpine\\Policies\\'.class_basename($modelClass).'Policy';
|
||||
return 'Filament\\Policies\\'.class_basename($modelClass).'Policy';
|
||||
});
|
||||
|
||||
// Implicitly grant "Super Admin" role all permissions
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Support;
|
||||
namespace Filament\Support;
|
||||
|
||||
class BladeDirectives {
|
||||
public static function alpineAssets()
|
||||
public static function filamentAssets()
|
||||
{
|
||||
return '{!! \Alpine::assets() !!}';
|
||||
return '{!! \Filament::assets() !!}';
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Support;
|
||||
namespace Filament\Support;
|
||||
|
||||
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Traits;
|
||||
namespace Filament\Traits;
|
||||
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Traits;
|
||||
namespace Filament\Traits;
|
||||
|
||||
trait EventMap
|
||||
{
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Alpine\Traits;
|
||||
namespace Filament\Traits;
|
||||
|
||||
use Alpine\Notifications\ResetPassword;
|
||||
use Filament\Notifications\ResetPassword;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Thomaswelton\LaravelGravatar\Facades\Gravatar;
|
||||
|
||||
trait AlpineUser
|
||||
trait FilamentUser
|
||||
{
|
||||
/**
|
||||
* Initialize the trait.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeAlpineUser()
|
||||
public function initializeFilamentUser()
|
||||
{
|
||||
$this->mergeFillable(['is_super_admin', 'avatar']);
|
||||
$this->mergeCasts(['is_super_admin' => 'boolean']);
|
||||
Reference in New Issue
Block a user