Skip to content

Commit

Permalink
* Readme upgrade guide updated (#366)
Browse files Browse the repository at this point in the history
* ServiceProvider file publish location fixed
* Login.blade - Was trying to change glyphicons to fontawesome. Removed changes while they aren't ok.
  • Loading branch information
andcarpi authored and resslinger committed Sep 9, 2019
1 parent 9f403ea commit 82fd6ad
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This package provides an easy way to quickly set up [AdminLTE v2](https://adminl
composer require jeroennoten/laravel-adminlte
```
2. Install the package using the command:
2. Install the package using the command (For fresh laravel installations):
```
php artisan adminlte:install
Expand All @@ -58,12 +58,29 @@ This package provides an easy way to quickly set up [AdminLTE v2](https://adminl
composer update jeroennoten/laravel-adminlte
```
2. Then, publish the public assets with the `--force` flag to overwrite existing files
2. Then, we need to update the assets
> If you using AdminLTE for Laravel 5.x and are upgrading Laravel 6 version, delete the folder adminlte inside your public/vendor folder.
And then use this command to publish new assets
```
php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=assets --force
php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\AdminLteServiceProvider" --tag=assets --force
```
3. If you have [published](#8-customize-views) and modified the default master, page views or login views, you will need to update them too.
Option 1:
- Make a copy of the views you modified.
- Publish the views again, using
```
php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\AdminLteServiceProvider" --tag=views
```
- Redo the modifications you did.
Option 2:
- Modify in the css, js and other assets location in the master and page views.
### 3.1 Breaking Changes
1. Version 1.25.1 to 1.26 and up:
Expand All @@ -76,6 +93,8 @@ This package provides an easy way to quickly set up [AdminLTE v2](https://adminl
3. Laravel 6 version moved the assets file. Check the locations.
- If you modified the default views, edit then fixing the assets injection.
## 4. Usage
To use the template, create a blade file and extend the layout with `@extends('adminlte::page')`.
Expand Down Expand Up @@ -364,7 +383,7 @@ Just specifiy the language in `config/app.php`.
If you need to modify the texts or add other languages, you can publish the language files:

```
php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=translations
php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\AdminLteServiceProvider" --tag=translations
```

Now, you can edit translations or add languages in `resources/lang/vendor/adminlte`.
Expand Down Expand Up @@ -422,7 +441,7 @@ To translate the menu headers, just use the `header` param. Example:
If you need full control over the provided views, you can publish them:

```
php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=views
php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\AdminLteServiceProvider" --tag=views
```

Now, you can edit the views in `resources/views/vendor/adminlte`.
Expand Down
2 changes: 1 addition & 1 deletion resources/views/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="form-group has-feedback {{ $errors->has('email') ? 'has-error' : '' }}">
<input type="email" name="email" class="form-control" value="{{ old('email') }}"
placeholder="{{ __('adminlte::adminlte.email') }}">
<span class="far fa-envelope form-control-feedback"></span>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
Expand Down
2 changes: 1 addition & 1 deletion src/AdminLteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private function publishConfig()
private function publishAssets()
{
$this->publishes([
$this->packagePath('resources/assets') => public_path('vendor/adminlte'),
$this->packagePath('resources/assets') => public_path(),
], 'assets');
}

Expand Down

0 comments on commit 82fd6ad

Please sign in to comment.