From aa567e1dbc03ad4640006a342c80bb33806e61f2 Mon Sep 17 00:00:00 2001 From: ilhm344 <117576293+ilhm344@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:50:07 +0500 Subject: [PATCH 1/2] Update home.blade.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit поменял оформление ссылок, добавил ссылку на форму для консультации --- resources/views/pages/ru/home.blade.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/views/pages/ru/home.blade.php b/resources/views/pages/ru/home.blade.php index e901c979..3e45a294 100644 --- a/resources/views/pages/ru/home.blade.php +++ b/resources/views/pages/ru/home.blade.php @@ -19,7 +19,7 @@ MoonShine это админ-панель, которую могут использовать разработчики разного уровня подготовки. - Новички - без проблем реализуют распространенные задачи - авторизацию, CRUD и работу с товарами. + Новички - без проблем реализуют распространенные задачи - авторизацию и CRUD. У MoonShine низкий порог вхождения, он дружелюбен для новичков. @@ -35,7 +35,7 @@ Для предложения улучшений MoonShine или документации, обязательно создавайте - Issue на GitHub с подробным описанием идеи. + Issue на GitHub с подробным описанием идеи. Вы очень поможете проекту. @@ -71,13 +71,14 @@ Если хотите быстро освоить MoonShine, рекомендую посмотреть мои - видео гайды - и статьи. + видео гайды + и статьи. Понадобилась помощь по MoonShine? Можете задать вопрос в - telegram-чате или заказать консультацию. + telegram-чате или + заказать консультацию. From e335725496c828b261ad2ae4c12b1f1a83328e9f Mon Sep 17 00:00:00 2001 From: ilhm344 <117576293+ilhm344@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:52:52 +0500 Subject: [PATCH 2/2] added translation of getting started section --- .../views/pages/en/configuration.blade.php | 184 ++++++++ .../views/pages/en/contribution.blade.php | 148 +++++++ resources/views/pages/en/home.blade.php | 86 ++++ .../views/pages/en/installation.blade.php | 122 ++++++ resources/views/pages/en/releases.blade.php | 61 +++ .../views/pages/en/support_policy.blade.php | 49 +++ .../views/pages/en/troubleshooting.blade.php | 30 ++ .../views/pages/en/upgrade_guide.blade.php | 395 ++++++++++++++++++ 8 files changed, 1075 insertions(+) create mode 100644 resources/views/pages/en/configuration.blade.php create mode 100644 resources/views/pages/en/contribution.blade.php create mode 100644 resources/views/pages/en/home.blade.php create mode 100644 resources/views/pages/en/installation.blade.php create mode 100644 resources/views/pages/en/releases.blade.php create mode 100644 resources/views/pages/en/support_policy.blade.php create mode 100644 resources/views/pages/en/troubleshooting.blade.php create mode 100644 resources/views/pages/en/upgrade_guide.blade.php diff --git a/resources/views/pages/en/configuration.blade.php b/resources/views/pages/en/configuration.blade.php new file mode 100644 index 00000000..d06b5ca6 --- /dev/null +++ b/resources/views/pages/en/configuration.blade.php @@ -0,0 +1,184 @@ + + +Config + + +use MoonShine\Exceptions\MoonShineNotFoundException; // [tl! focus:start] +use MoonShine\Forms\LoginForm; +use MoonShine\Http\Middleware\Authenticate; +use MoonShine\Http\Middleware\SecurityHeadersMiddleware; +use MoonShine\Models\MoonshineUser; +use MoonShine\MoonShineLayout; +use MoonShine\Pages\ProfilePage; // [tl! focus:end] + +return [ // [tl! focus] + # The directory where the resources are located + 'dir' => 'app/MoonShine', // [tl! focus] + # If the directory is changed, the namespace must also be changed according to the psr-4 + 'namespace' => 'App\MoonShine', // [tl! focus] + + # Admin panel header + 'title' => env('MOONSHINE_TITLE', 'MoonShine'), // [tl! focus] + # You can change the logo by specifying a path (example - /images/logo.svg) + 'logo' => env('MOONSHINE_LOGO'), // [tl! focus] + 'logo_small' => env('MOONSHINE_LOGO_SMALL'), // [tl! focus] + + 'route' => [ // [tl! focus] + # If the domain is different from the site domain + 'domain' => env('MOONSHINE_URL', ''), + # Which path will be used to access the control panel + # If the value is left blank, the panel will be accessible from / + 'prefix' => env('MOONSHINE_ROUTE_PREFIX', 'admin'), // [tl! focus] + # Home Page Routing Name + 'index' => 'moonshine.index', // [tl! focus] + # Prefix of url formation for pages + 'single_page_prefix' => 'page', // [tl! focus] + # Middlewares groups in the panel + 'middlewares' => [ // [tl! focus] + SecurityHeadersMiddleware::class, // [tl! focus] + ], // [tl! focus] + # You can change the exception for 404 (for ModelNotFound you need to implement it yourself) + 'notFoundHandler' => MoonShineNotFoundException::class, // [tl! focus] + ], + + # If you want to replace MoonshineUser with your model, you can disable the default migrations + 'use_migrations' => true, // [tl! focus] + # Notification On/Off + 'use_notifications' => true, // [tl! focus] + + # Class for rendering the main page template + 'layout' => MoonShineLayout::class, // [tl! focus] + + # Default Filesystem Disk + 'disk' => 'public', // [tl! focus] + + 'forms' => [ // [tl! focus] + # form of authentication + 'login' => LoginForm::class // [tl! focus] + ], // [tl! focus] + + 'pages' => [ // [tl! focus] + # Dashboard page, the default page is created when MoonShine is installed + 'dashboard' => App\MoonShine\Pages\Dashboard::class, // [tl! focus] + # Profile page + 'profile' => ProfilePage::class // [tl! focus] + ], // [tl! focus] + + # Default import and export from ModelResource + 'model_resources' => [ // [tl! focus] + 'default_with_import' => true, // [tl! focus] + 'default_with_export' => true, // [tl! focus] + ], // [tl! focus] + + 'auth' => [ // [tl! focus] + # On/Off Authentication. If false, the panel will be available to everyone + 'enable' => true, // [tl! focus] + 'middleware' => Authenticate::class, // [tl! focus] + 'fields' => [ // [tl! focus:start] + 'username' => 'email', + 'password' => 'password', + 'name' => 'name', + 'avatar' => 'avatar', + ], // [tl! focus:end] + # If you use your own guard, the provider + 'guard' => 'moonshine', // [tl! focus:start] + 'guards' => [ + 'moonshine' => [ + 'driver' => 'session', + 'provider' => 'moonshine', + ], + ], + 'providers' => [ + 'moonshine' => [ + 'driver' => 'eloquent', + 'model' => MoonshineUser::class, + ], + ], // [tl! focus:end] + ], // [tl! focus] + # Possible translation options + 'locales' => [ // [tl! focus:start] + 'en', + 'ru', + ], // [tl! focus:end] + + 'tinymce' => [ // [tl! focus] + # File Manager Root, details in the Fields section + 'file_manager' => false, // [tl! focus] + 'token' => env('MOONSHINE_TINYMCE_TOKEN', ''), // [tl! focus] + 'version' => env('MOONSHINE_TINYMCE_VERSION', '6'), // [tl! focus] + ], // [tl! focus] + + # Authentication via social networks and socialite, list the drivers and specify the logo + 'socialite' => [ // [tl! focus:start] + // 'driver' => 'path_to_image_for_button' + ], // [tl! focus:end] +]; // [tl! focus] + + + + For basic use it is sufficient to edit the parameters below: + + + +// ... + +return [ + // ... + + 'title' => env('MOONSHINE_TITLE', 'MoonShine'), // [tl! focus] + 'logo' => env('MOONSHINE_LOGO', ''), // [tl! focus] + 'logo_small' => env('MOONSHINE_LOGO_SMALL'), // [tl! focus] + + 'route' => [ + 'prefix' => env('MOONSHINE_ROUTE_PREFIX', 'admin'), // [tl! focus] + ], + + // ... +]; + + +Home page + + + If you need to override the home page in the MoonShine admin panel, + this can be done using the static method home() of the class MoonShine + at the service provider MoonShineServiceProvider. + + + +home(string|Closure $homeClass) + + + +use App\MoonShine\Pages\CustomPage; +use App\MoonShine\Resources\PostResource; +use MoonShine\Providers\MoonShineApplicationServiceProvider; +use MoonShine\MoonShine; + +class MoonShineServiceProvider extends MoonShineApplicationServiceProvider +{ + public function register(): void + { + MoonShine::home(CustomPage::class); // [tl! focus] + // or + MoonShine::home(PostResource::class); // [tl! focus] + // or + MoonShine::home(function () { + return PostResource::class; + }); // [tl! focus:-2] + } + + //... + +} + + + diff --git a/resources/views/pages/en/contribution.blade.php b/resources/views/pages/en/contribution.blade.php new file mode 100644 index 00000000..76c3ddcd --- /dev/null +++ b/resources/views/pages/en/contribution.blade.php @@ -0,0 +1,148 @@ + + +What can I do to help? + + + The community needs active users. You can help in many ways: + + + + +Let's use + + + +Where do we start? + + + There is a product that is already functioning, fully functional and testable. Functional doesn't mean great, + so our job is to make it better. + + +Pull requests + + + You can suggest new features or improvements for MoonShine! Errors and bugs - all this can be fixed and sent for revision. + I am also glad to have new specialists for open source project development. + + +Where to discuss the development? + + + A separate chat in telegram has been created for active participants of the project. If you are ready to take part in the development, + then join - MoonShine. + + + +If you find a mistake + + + 1. You have enough experience to offer a solution. + I will be extremely glad to have your PR with a description of the error and an option to fix it.
+ 2. If you don't know how to solve the problem - create GitHub issues and we will fix the problem soon. + +
+ + + It is important that your pr passes all platform tests and has a detailed description, + so that it is clear to everyone involved in the development what exactly happened. + + + +Main branch + + + At the moment, the main branch 2.x + + +Coding style + + + MoonShine adheres to PSR-12 standard and PSR-4 autoload standard. + + +Instructions for developers + +1 Create a directory for the project and clone the demo. + + + git clone git@github.com:moonshine-software/demo-project.git . + + +2 Add the packages directory and run the command below. + + + cd packages && git clone git@github.com:moonshine-software/moonshine.git && cd moonshine && composer install && npm install + + +3 Go back to the project directory and in composer.json change the moonshine/moonshine dependency. + + + "moonshine/moonshine": "2.*.*-dev", + + +4 Add in composer.json. + + +"repositories": [ + { + "type": "path", + "url": "packages/moonshine", + "options": { + "versions": { + "moonshine/moonshine": "2.*.*-dev" + }, + "symlink": true + } + } +] + + +5 Create .env from .env.example (don't forget to create a database) and perform the installation below. + + +php artisan key:generate +php artisan storage:link +php artisan migrate --seed +php artisan moonshine:user +php artisan serve + + +# Create something useful! + +How do I make a pull request? + + + +Any questions? + + + My name is Danil! Write to me on e-mail thecutcode@gmail.com + + +
diff --git a/resources/views/pages/en/home.blade.php b/resources/views/pages/en/home.blade.php new file mode 100644 index 00000000..3e2e6e4f --- /dev/null +++ b/resources/views/pages/en/home.blade.php @@ -0,0 +1,86 @@ + + +
+ +
+ + Hi Laravel user! + + + MoonShine is an open source package for open source Laravel projects (MIT license) + for accelerated development of web projects. + + + MoonShine is great for creating admin panels, MVPs, backoffice applications, and content management systems (CMS). + + + MoonShine is an admin panel that can be used by developers of different backgrounds. + + + Newbies - have no problem implementing common tasks - authorization and CRUD. + MoonShine has a low entry threshold and is beginner friendly. + + + + MoonShine is a very handy and functional tool. + However, to use it, you need to be confident in the basics of Laravel. + + + + Professionals - use all the features of Laravel without limitations, + while getting the tools to speed up your work - "framework on framework". + + + + To suggest MoonShine improvements or documentation, be sure to create a + Issue on GitHub with a detailed description of the idea. + You will help the project a lot. + + + Features + + + + + History of the name + + What does MoonShine stand for? It's not exactly "moonlight": my idea of it is the name "moonshine". + Literally, it's the independent making of a drink under illegal conditions under the cover of night. + So I spent nights in my spare time (mostly at night) developing this admin panel, + making a quality product with heart, for my own use. Well, and for friends. + Everything is already ready for use in your projects, created documentation describing the order of installation, + customization and features. I suggest that interested users use and develop MoonShine together. + + + Where to start? + + MoonShine is ready to appear in your project. Simply execute + installation guide, + and then find in the documentation how to implement the required functionality and add it to your project. + + + + If you want to learn MoonShine quickly, I recommend checking out my + video guides + and articles. + + + + Need help with MoonShine? You can ask a question at + telegram-chat or + book a consultation. + + + + +
diff --git a/resources/views/pages/en/installation.blade.php b/resources/views/pages/en/installation.blade.php new file mode 100644 index 00000000..fae4af64 --- /dev/null +++ b/resources/views/pages/en/installation.blade.php @@ -0,0 +1,122 @@ + + +Requirements + + + To use MoonShine, the following requirements must be met before installation: + + + + +Composer + + + composer require moonshine/moonshine + + +Installation + + + php artisan moonshine:install + + + + Once executed, a config/moonshine.php with basic settings will be added.
+ More information about the configuration file +
+ + + A directory with the administration panel and resources will also be added - app/MoonShine.
+ Read more about Resources +
+ + + And a MoonShineServiceProvider provider will also be added, + where resources should be registered.
+ Подробнее о Ресурсах +
+ +Creating an administrator + + + If during the installation of the admin panel MoonShine an administrator was not created or it is necessary to create another one, + you can do it by executing the console command. + + + + php artisan moonshine:user + + +Service provider + + + To register new resources in MoonShine and create a menu, we will need to app/Providers/MoonShineServiceProvider.php + + + +namespace App\Providers; + +use MoonShine\Menu\MenuGroup; +use MoonShine\Menu\MenuItem; +use MoonShine\Providers\MoonShineApplicationServiceProvider; +use MoonShine\Resources\MoonShineUserResource; +use MoonShine\Resources\MoonShineUserRoleResource; + +class MoonShineServiceProvider extends MoonShineApplicationServiceProvider +{ + protected function resources(): array + { + return [ + ]; + } + + protected function menu(): array + { + return [ + MenuGroup::make('moonshine::ui.resource.system', [ + MenuItem::make('moonshine::ui.resource.admins_title', new MoonShineUserResource()) + ->translatable(), + MenuItem::make('moonshine::ui.resource.role_title', new MoonShineUserRoleResource()) + ->translatable(), + ])->translatable(), + + MenuItem::make('Documentation', 'https://laravel.com') + ->badge(fn() => 'Check'), + ]; + } + + protected function theme(): array + { + return []; + } +} + + + + Once installed, several resources will be registered in the MoonShineServiceProvider.
+ Read more about Menu. +
+ + + Great! Now you can create and register sections of the future admin panel and get to work! + But don't forget to read the documentation until the end! + + + + By default, the admin panel can be accessed by url /admin.
+ You can change the url in + configuration file. +
+ +
diff --git a/resources/views/pages/en/releases.blade.php b/resources/views/pages/en/releases.blade.php new file mode 100644 index 00000000..7b5520ca --- /dev/null +++ b/resources/views/pages/en/releases.blade.php @@ -0,0 +1,61 @@ + + +
+
diff --git a/resources/views/pages/en/support_policy.blade.php b/resources/views/pages/en/support_policy.blade.php new file mode 100644 index 00000000..77ea6b6d --- /dev/null +++ b/resources/views/pages/en/support_policy.blade.php @@ -0,0 +1,49 @@ + + + + Version + PHP + Laravel + Release + Bug Fixes Until + Security Fixes Until + + + + 1 + 7.3 - 8.0 + 8 - 9 + June 6th, 2022 + April 3rd, 2023 + April 3rd, 2023 + + + 1.5 + 8.0 - 8.2 + 9 - 10 + April 3rd, 2023 + November 1st, 2023 + November 1st, 2024 + + + 2.0 + 8.1 - 8.2 + 10 + November 1st, 2023 + November 1st, 2024 + November 1st, 2025 + + + 3.0 + 8.2 + 11 + November 1st, 2024 + November 1st, 2025 + November 1st, 2026 + + + + + End of life + Security fixes only + diff --git a/resources/views/pages/en/troubleshooting.blade.php b/resources/views/pages/en/troubleshooting.blade.php new file mode 100644 index 00000000..303ea5d0 --- /dev/null +++ b/resources/views/pages/en/troubleshooting.blade.php @@ -0,0 +1,30 @@ + + Images are not displayed + +
    +
  1. Make sure you've done php artisan storage:link
  2. +
  3. Make sure the disk is selected by default public, not local
  4. +
  5. Check that APP_URL in .env true
  6. +
+ + Default language + + + If you have left only one language in the MoonShine config, but another language is used in the panel + + +
    +
  1. Make sure that the Laravel config config/app.php specifies the same language as MoonShine
  2. +
+ + Problems with https + + + If you have forms using url with http, but expect https + + +
    +
  1. Make sure you have a quality ssl certificate
  2. +
  3. В middleware TrustProxies set protected $proxies = ['*']
  4. +
+
diff --git a/resources/views/pages/en/upgrade_guide.blade.php b/resources/views/pages/en/upgrade_guide.blade.php new file mode 100644 index 00000000..6cc4b57c --- /dev/null +++ b/resources/views/pages/en/upgrade_guide.blade.php @@ -0,0 +1,395 @@ + + + + Upgrading To 2.0 From 1.5 + + +Minimum requirements + + + + + Before updating, it is recommended to delete the folder public/vendor/moonshine. + + +Composer.json + + + Change version MoonShine. + + + +"require": { + "php": "^8.1", + "guzzlehttp/guzzle": "^7.2", + "laravel/framework": "^10.23", + "lee-to/moonshine-algolia-search": "^1.0", + "moonshine/moonshine": "^1.60" // [tl! -- **] + "moonshine/moonshine": "^2.0" // [tl! ++ **] +}, + + + + Execute the console command. + + + +composer update + + + + Errors will occur during the upgrade process. This is because some components of the admin panel have been changed. + The following steps will help to eliminate these errors. + + +MoonShineServiceProvider + + + The MoonShineServiceProvider needs to be modified. It now inherits from MoonShineApplicationServiceProvider, + and the menu declaration is moved to a separate method menu(). + + + +use Illuminate\Support\ServiceProvider; // [tl! -- **] +use MoonShine\Providers\MoonShineApplicationServiceProvider; // [tl! ++ **] +//... + +class MoonShineServiceProvider extends ServiceProvider // [tl! -- **] +class MoonShineServiceProvider extends MoonShineApplicationServiceProvider // [tl! ++ **] +{ + + public function boot(): void // [tl! -- **] + protected function menu(): array // [tl! ++ **] + { + app(MoonShine::class)->menu([ // [tl! -- **] + return [ // [tl! ++ **] + MenuGroup::make('System', [ + MenuItem::make('Settings', new SettingResource(), 'heroicons.outline.adjustments-vertical'), + MenuItem::make('Admins', new MoonShineUserResource(), 'heroicons.outline.users'), + MenuItem::make('Roles', new MoonShineUserRoleResource(), 'heroicons.outline.shield-exclamation'), + ], 'heroicons.outline.user-group')->canSee(static function () { + return auth('moonshine')->user()->moonshine_user_role_id === 1; + }), + + //... + + ]); // [tl! -- **] + ]; // [tl! ++ **] + } +} + + +Icons + + + MoonShine 2.0 uses only icons from the Heroicons set, + so it is necessary to replace the old system icons (add, app, bookmark, + bookmark, clip, delete, edit, export, filter, search, show and users). + + + + For more information, please refer to the section + Icons. + + +Resources + + + In MoonShine 2.0, resources are isolated from models, + but there is a special ModelResource to work with Eloquent. + + + + Resource should be replaced by ModelResource, public properties by protected properties. + + + + The property to display in relationship fields titleField should be renamed to column. + + + + The property to go after save routeAfterSave in the MoonShine 2.0 renamed to + redirectAfterSave, or you can use the method redirectAfterSave(), + which returns a string with the route to redirect. + + + + For more information, please refer to the section + Resources. + + + + Also some properties have been renamed. + + + +use MoonShine\Resources\Resource; // [tl! -- **] +use MoonShine\Resources\ModelResource; // [tl! ++ **] + +//... + +class ArticleResource extends Resource // [tl! -- **] +class ArticleResource extends ModelResource // [tl! ++ **] +{ + public static string $model = Article::class; // [tl! -- **] + protected string $model = Article::class; // [tl! ++ **] + + public static string $title = 'Articles'; // [tl! -- **] + protected string $title = 'Articles'; // [tl! ++ **] + + public string $titleField = 'title'; // [tl! -- **] + protected string $column = 'title'; // [tl! ++ **] + + protected string $routeAfterSave = 'index'; // [tl! -- **] + + public static string $orderField = 'created_at'; // [tl! -- **] + protected string $sortColumn = 'created_at'; // [tl! ++ **] + + public static string $orderType = 'DESC'; // [tl! -- **] + protected string $sortDirection = 'DESC'; // [tl! ++ **] + + public static array $with = ['author', 'comments']; // [tl! -- **] + protected array $with = ['author', 'comments']; // [tl! ++ **] + + //... + +} + + +Fields + + + The changes in MoonShine 2.0 affect fields as well. + + + + All relationship fields have had their namespace changed. + + + +use MoonShine\Fields\BelongsTo; // [tl! -- **] +use MoonShine\Fields\Relationships\BelongsTo; // [tl! ++ **] + +use MoonShine\Fields\BelongsToMany; // [tl! -- **] +use MoonShine\Fields\Relationships\BelongsToMany; // [tl! ++ **] + +use MoonShine\Fields\HasMany; // [tl! -- **] +use MoonShine\Fields\Relationships\HasMany; // [tl! ++ **] + +use MoonShine\Fields\HasManyThrough; // [tl! -- **] +use MoonShine\Fields\Relationships\HasManyThrough; // [tl! ++ **] + +use MoonShine\Fields\HasOne; // [tl! -- **] +use MoonShine\Fields\Relationships\HasOne; // [tl! ++ **] + +use MoonShine\Fields\HasOneThrough; // [tl! -- **] +use MoonShine\Fields\Relationships\HasOneThrough; // [tl! ++ **] + +use MoonShine\Fields\MorphMany; // [tl! -- **] +use MoonShine\Fields\Relationships\MorphMany; // [tl! ++ **] + +use MoonShine\Fields\MorphTo; // [tl! -- **] +use MoonShine\Fields\Relationships\MorphTo; // [tl! ++ **] + +use MoonShine\Fields\MorphToMany; // [tl! -- **] +use MoonShine\Fields\Relationships\MorphToMany; // [tl! ++ **] + + + + For relationship fields it is obligatory to specify the model resource.
+ The second parameter is not a field in the table, but the name of the relationship! +
+ + +use MoonShine\Fields\Relationships\BelongsTo; + +class ArticleResource extends ModelResource +{ + //... + + public function fields(): array + { + BelongsTo::make('Author', resource: 'name') // [tl! -- **] + BelongsTo::make('Author', 'author', resource: new MoonShineUserResource()); // [tl! ++ **] + + //... + } + + //... +} + + + + In MoonShine 2.0 for fields. HasOne and HasMany there is no more separation and + are only displayed in resourceMode. Methods removable() and fullPage() have been excluded.
+ If these fields should be placed in the main form, + you can use the field + Json in relationship mode. +
+ + + Method onlyCount() fields HasMany renamed to onlyLink() + and now allows you to display not only the quantity, but also creates a link to view their records. + + + + The BelongsToMany relationship field has a BelongsToMany method select() renamed to selectMode(). + + + + + + +Filters + + + In the MoonShine 2.0 admin panel the same fields are used for building filters, + duplicate fields for filters have been eliminated. + + + + For more information, please refer to the section + Filters. + + +Import / Export + + + By default, imports and exports are already included in all model resources. + + + +use MoonShine\Actions\ExportAction; // [tl! -- **] +use MoonShine\Actions\ImportAction; // [tl! -- **] + +class ArticleResource extends ModelResource +{ + //... + + public function actions(): array // [tl! -- **] + { // [tl! -- **] + return [ // [tl! -- **] + ExportAction::make('Export'), // [tl! -- **] + ImportAction::make('Import') // [tl! -- **] + ]; // [tl! -- **] + } // [tl! -- **] +} + + + + For more information, please refer to the section + Import/Export. + + +Actions + + + ItemActions, FormActions and DetailActions and + the corresponding methods were excluded from the admin panel.
+ In MoonShine 2.0, this function is performed by. ActionButton. +
+ + + +use MoonShine\FormActions\FormAction; // [tl! -- **] +use MoonShine\ItemActions\ItemAction; // [tl! -- **] + +class ArticleResource extends ModelResource +{ + //... + + public function itemActions(): array // [tl! -- **] + public function indexButtons(): array // [tl! ++ **] + { + return [ + ItemAction::make('Go to', fn (Article $item) => to_route('articles.show', $item)) // [tl! -- **] + ActionButton::make('Go to', fn (Article $item) => to_route('articles.show', $item)) // [tl! ++ **] + ]; + } +} + + + + For more information, please refer to the section + ActionButton. + + +Updating dependencies + + + After all changes have been made, you should try again to update the dependencies. + The update should complete without errors. + + + +composer update + + + + If the assets were not published at the time of the update, they must be published. + + + + php artisan moonshine:publish + + +or + + +php artisan vendor:publish --tag=laravel-assets --ansi --force + + +Config + + + The new version of MoonShine has completely changed sonfig. + You can publish the new configuration file via the console command. + After publishing, make the necessary adjustments. + + + +php artisan moonshine:install + + +Dashboard + + + Dashboard as well as CustomPage now this + Pages. + Once installed, a page is generated for the Dashboard app/MoonShine/Pages/Dashboard.php. + You need to move all components to a new page. + + + + Congratulations on your successful project update! + + +