Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup and mention laravel 11 #576

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 6.x/base-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion 6.x/crud-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -60,15 +60,19 @@ 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=')
->crossorigin('anonymous');

// 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/[email protected]/dist/themes/light.css');

Widget::add()->type('style')
->content('https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/dist/themes/light.css')
->integrity('sha256-0YPKAwZP7Mp3ALMRVB2i8GXeEndvCq3eSl/WsAl1Ryk=')
Expand Down
8 changes: 4 additions & 4 deletions 6.x/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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; <span class="badge badge-pill badge-success">FREE</span>
- installed Backpack\PRO; <span class="badge badge-pill badge-info">PRO</span>
- installed Backpack\Editable-Columns; <span class="badge badge-pill badge-warning">PREMIUM</span>
Expand Down Expand Up @@ -58,18 +58,18 @@ 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
```

<a name="usage"></a>
## Demo Usage

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 ```[email protected]```, 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.
Expand Down
4 changes: 2 additions & 2 deletions 6.x/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<a name="requirements"></a>
## 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;

Expand Down
2 changes: 1 addition & 1 deletion 6.x/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ We heavily recommend you spend a little time to understand Backpack, and only af
<a name="requirements"></a>
### Requirements

- Laravel 10.x
- Laravel 10.x or 11.x
- MySQL / PostgreSQL / SQLite / SQL Server

<a name="how-does-it-look"></a>
Expand Down