See below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Models\Tag; | |
use Livewire\Attributes\Locked; | |
use Livewire\Attributes\Url; | |
use Livewire\Attributes\Validate; | |
use Livewire\Volt\Component; | |
use Livewire\WithPagination; | |
new class extends Component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Statamic.booting(() => { | |
Alpine.magic('useField', (el) => { | |
return () => { | |
const vm = closestVm(el); | |
if (!vm) { | |
return; | |
} | |
const data = Alpine.reactive({ | |
value: vm.value, |
With this method anyone who has the package installed will no longer receive updates and the addon will appear as unlisted in the control panel. The old package will still be installable via composer (GitHub should redirect the old repo URL), however it will output a warning advising the user to switch to the new version.
- Disconnect the GitHub repo from Packagist
- Rename the GitHub repo
- Push an updated composer.json plus anything else that needs renaming
- Resubmit the package to Packagist using the new name
- Mark the old package as abandoned on Packagist, and use the new name in the form
- Update Statamic marketplace with the new GitHub URL and Packagist name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Fieldtypes; | |
use Statamic\Fields\Fieldtype; | |
class Divider extends Fieldtype | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function register() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
sorts: | |
title: Name | |
price:asc: Price (Low – High) | |
price:desc: Price (High – Low) | |
features: | |
- Glitter | |
- Lights | |
- Sparkles | |
- Wheels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Statamic::booted(function () { | |
foreach (app()['files']->files(app_path('Values')) as $file) { | |
$class = $file->getBasename('.php'); | |
$fqcn = $this->app->getNamespace()."Values\\{$class}"; | |
if (is_subclass_of($fqcn, Values::class)) { | |
$object = app($fqcn); | |
$collections = $fqcn::$collections; | |
$fields = Arr::except(get_class_methods($object), '__construct'); | |
foreach ($collections as $collection) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\Taxonomies\LocalizedTerm; | |
use Illuminate\Support\ServiceProvider; | |
use Statamic\Taxonomies\LocalizedTerm as StatamicLocalizedTerm; | |
class AppServiceProvider extends ServiceProvider | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Statamic\Tags\Loader; | |
use Statamic\View\Antlers\Parser; | |
if (! function_exists('statamic_form')) { | |
function statamic_form($handle, $params = []) | |
{ | |
$form = Form::find($handle); | |
$html = app(Loader::class)->load('form', [ | |
'parser' => app(Parser::class), |
NewerOlder