From 3359b504d2abcd10bc2029f1846f940dcf5813a0 Mon Sep 17 00:00:00 2001 From: "Pedro X." Date: Wed, 8 May 2024 10:23:59 +0100 Subject: [PATCH] cleanup and mention laravel 11 --- 6.x/base-how-to.md | 3 ++- 6.x/crud-how-to.md | 6 +++++- 6.x/demo.md | 8 ++++---- 6.x/installation.md | 4 ++-- 6.x/introduction.md | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/6.x/base-how-to.md b/6.x/base-how-to.md index f9f4c22e..dd7e2aec 100644 --- a/6.x/base-how-to.md +++ b/6.x/base-how-to.md @@ -484,9 +484,10 @@ return new class extends Migration ``` Then run `php artisan migrate`. [More info](https://laravel.com/docs/10.x/verification#database-preparation). -**Step 3** - Make sure you have the `verified` and `signed` middleware alias in your `App\Http\Kernel.php` file. New Laravel 10 installations already have them, but if you came from earlier versions it's possible that they are missing. +**Step 3** - New Laravel 10/11 installations already have them in place so you can skip this step. If you came from earlier versions it's possible that they are missing in your app, in that case you can add them manually. ```php +// for Laravel 10: protected $middlewareAliases = [ // ... other middleware aliases 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, diff --git a/6.x/crud-how-to.md b/6.x/crud-how-to.md index 88504832..ddf976ee 100644 --- a/6.x/crud-how-to.md +++ b/6.x/crud-how-to.md @@ -39,7 +39,7 @@ If you want the route to point to a different controller, you can add the route Backpack loads its views through a double-fallback mechanism: - by default, it will load the views in the vendor folder (the package views); -- if you've included views with the exact same name in your ```resources/views/vendor/backpack/crud``` folder, it will pick up those instead; you can use this method to overwrite a blade file for all CRUDs; +- if you've included views with the exact same name in your ```resources/views/vendor/backpack/*``` folder, it will pick up those instead; you can use this method to overwrite a blade file for the whole application. - alternatively, if you only want to change a blade file for one CRUD, you can use the methods below in your ```setup()``` method, to change a particular view: ```php CRUD::setShowView('your-view'); @@ -60,7 +60,9 @@ use Backpack\CRUD\app\Library\Widget; // script widget - works the same for both local paths and CDN Widget::add()->type('script')->content('assets/js/custom-script.js'); + Widget::add()->type('script')->content('https://code.jquery.com/ui/1.12.0/jquery-ui.min.js'); + Widget::add()->type('script') ->content('https://code.jquery.com/ui/1.12.0/jquery-ui.min.js') ->integrity('sha256-0YPKAwZP7Mp3ALMRVB2i8GXeEndvCq3eSl/WsAl1Ryk=') @@ -68,7 +70,9 @@ Widget::add()->type('script') // style widget - works the same for both local paths and CDN Widget::add()->type('style')->content('assets/css/custom-style.css'); + Widget::add()->type('style')->content('https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.58/dist/themes/light.css'); + Widget::add()->type('style') ->content('https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.58/dist/themes/light.css') ->integrity('sha256-0YPKAwZP7Mp3ALMRVB2i8GXeEndvCq3eSl/WsAl1Ryk=') diff --git a/6.x/demo.md b/6.x/demo.md index 81a85e27..72394941 100644 --- a/6.x/demo.md +++ b/6.x/demo.md @@ -8,7 +8,7 @@ We've put together a working Laravel app (backend-only). This should make it eas - change stuff in code, to see how easy it is to customize Backpack; In this [Demo repository](https://github.com/laravel-backpack/demo), we've: -- installed Laravel 10; +- installed Laravel 11; - installed Backpack\CRUD; FREE - installed Backpack\PRO; PRO - installed Backpack\Editable-Columns; PREMIUM @@ -58,10 +58,10 @@ php artisan db:seed --class="Backpack\Settings\database\seeds\SettingsTableSeede php artisan db:seed ``` -5) Internalize the CSS and JS assets using Basset: +5) Cache the CSS and JS assets using Basset: ```zsh php artisan storage:link -php artisan basset:internalize +php artisan basset:cache ``` @@ -69,7 +69,7 @@ php artisan basset:internalize Once everything's installed, and your database has been set up: -- Your admin panel is available at http://localhost/backpack-demo/admin +- Your admin panel is available at `{APP_URL}`/admin - Login with email ```admin@example.com```, password ```admin``` - You can register a different account, to check out the process and see your Gravatar inside the admin panel. - By default, registration is open only in your local environment. Check out ```config/backpack/base.php``` to change this and other preferences. diff --git a/6.x/installation.md b/6.x/installation.md index 3abb50d1..8fc6859d 100644 --- a/6.x/installation.md +++ b/6.x/installation.md @@ -5,11 +5,11 @@ ## Requirements -If you can run Laravel 10, you can install Backpack. Backpack does _not_ have additional requirements. +If you can run Laravel 10 or 11, you can install Backpack. Backpack does _not_ have additional requirements. For the following process, we assume: -- you have a [working installation of Laravel](https://laravel.com/docs/10.x#installation) (an existing project is fine, you don't need a *fresh* Laravel install); +- you have a [working installation of Laravel](https://laravel.com/docs/11.x#installation) (an existing project is fine, you don't need a *fresh* Laravel install); - you have configured your .ENV file with your database and mail information; diff --git a/6.x/introduction.md b/6.x/introduction.md index f1e1fc83..7bab24a6 100644 --- a/6.x/introduction.md +++ b/6.x/introduction.md @@ -56,7 +56,7 @@ We heavily recommend you spend a little time to understand Backpack, and only af ### Requirements - - Laravel 10.x + - Laravel 10.x or 11.x - MySQL / PostgreSQL / SQLite / SQL Server