-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Statamic 5 support + install command (#69)
- Loading branch information
Showing
13 changed files
with
215 additions
and
62 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
tabs: | ||
main: | ||
display: Main | ||
sections: | ||
- | ||
fields: | ||
- | ||
handle: option_id | ||
field: | ||
type: integer | ||
localizable: false | ||
visibility: read_only | ||
- | ||
handle: sort_order | ||
field: | ||
type: integer | ||
localizable: false | ||
visibility: read_only | ||
- | ||
handle: value_admin | ||
field: | ||
type: text | ||
localizable: false | ||
visibility: read_only | ||
- | ||
handle: value_store | ||
field: | ||
type: text | ||
localizable: false | ||
visibility: read_only | ||
title: Brand |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
tabs: | ||
main: | ||
sections: | ||
- | ||
fields: | ||
- | ||
handle: entity_id | ||
field: | ||
type: integer | ||
localizable: false | ||
visibility: read_only | ||
- | ||
handle: name | ||
field: | ||
type: text | ||
localizable: false | ||
visibility: read_only |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
tabs: | ||
main: | ||
sections: | ||
- | ||
fields: | ||
- | ||
handle: entity_id | ||
field: | ||
type: integer | ||
localizable: false | ||
visibility: read_only | ||
- | ||
handle: sku | ||
field: | ||
type: text | ||
localizable: false | ||
visibility: read_only | ||
- | ||
handle: name | ||
field: | ||
type: text | ||
localizable: false | ||
visibility: read_only |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@foreach ($content as $set) | ||
@includeFirstSafe(['page_builder.' . $set['type'], 'rapidez-statamic::page_builder.' . $set['type']], $set) | ||
@includeFirstSafe(['page_builder.' . $set['type'], 'rapidez-statamic::page_builder.' . $set['type']], optionalDeep($set)->toArray()) | ||
@endforeach |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
namespace Rapidez\Statamic\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class InstallCommand extends Command | ||
{ | ||
protected $signature = 'rapidez-statamic:install'; | ||
|
||
protected $description = 'Install Rapidez Statamic'; | ||
|
||
public function handle(): void | ||
{ | ||
$this->call('vendor:publish', [ | ||
'--tag' => 'runway-config', | ||
]); | ||
|
||
$this->call('vendor:publish', [ | ||
'--provider' => 'Statamic\Eloquent\ServiceProvider', | ||
'--tag' => 'statamic-eloquent-config', | ||
]); | ||
|
||
$this->confirm('Did you set the table_prefix in config/statamic/eloquent-driver.php to "statamic_"?', 1); | ||
|
||
$this->call('statamic:install:eloquent-driver'); | ||
|
||
$this->info('If you would like to store users in the database please make sure to follow this guide: https://statamic.dev/tips/storing-users-in-a-database#from-a-fresh-statamic-project'); | ||
|
||
if ($this->confirm('Would you like to configure a multisite? Note: Configuring a multisite requires a Statamic PRO license.')) { | ||
$this->call('statamic:multisite'); | ||
} | ||
|
||
if ($this->confirm('Would you like to publish Collections, Blueprints, Fieldsets & Views?', 1)) { | ||
$this->call('vendor:publish', [ | ||
'--provider' => 'Rapidez\Statamic\RapidezStatamicServiceProvider', | ||
'--tag' => 'rapidez-statamic-content', | ||
]); | ||
|
||
$this->call('vendor:publish', [ | ||
'--provider' => 'Rapidez\Statamic\RapidezStatamicServiceProvider', | ||
'--tag' => 'views', | ||
]); | ||
} | ||
|
||
if ($this->confirm('Would you like to make a user?', 1)) { | ||
$this->call('statamic:make:user'); | ||
} | ||
|
||
$this->info('Done 🚀'); | ||
} | ||
} |
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
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
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
Oops, something went wrong.