Skip to content

Commit cf937f8

Browse files
committed
renamed package to MenuCRUD
1 parent 8589270 commit cf937f8

File tree

6 files changed

+47
-41
lines changed

6 files changed

+47
-41
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
All Notable changes to `:package_name` will be documented in this file.
3+
All Notable changes to `MenuCRUD` will be documented in this file.
44

55
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
66

@@ -22,6 +22,12 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
2222
- Nothing
2323

2424

25+
## 1.0.2 - 2016-05-26
26+
27+
### Fixed
28+
- Renamed to MenuCRUD;
29+
30+
2531
## 1.0.1 - 2016-05-26
2632

2733
### Fixed

README.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Backpack\MenuManager
1+
# Backpack\MenuCRUD
22

33
[![Latest Version on Packagist][ico-version]][link-packagist]
44
[![Software License][ico-license]](LICENSE.md)
@@ -26,16 +26,20 @@ The only PRO of installing it as a package is that you may benefit from updates.
2626
#### Intallation type (A) - download
2727

2828

29-
1) [Download the latest build](https://github.com/Laravel-Backpack/menumanager/archive/master.zip).
29+
1) [Download the latest build](https://github.com/Laravel-Backpack/MenuCRUD/archive/master.zip).
3030

3131
2) Paste the 'app' folder over your 'app' folder. No overwrite warnings should come up.
3232

33-
3) Run the migration to have the database table we need:
33+
3) Replace all mentions of 'Backpack\MenuCRUD\app' in the pasted files with your application's namespace ('App' if you haven't changed it):
34+
- app/Http/Controllers/Admin/MenuItemCrudController.php
35+
- app/Models/MenuItem.php
36+
37+
4) Run the migration to have the database table we need:
3438
```
3539
php artisan migrate
3640
```
3741

38-
4) Add MenuCRUD to your routes file:
42+
5) Add MenuCRUD to your routes file:
3943

4044
```
4145
Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth'], 'namespace' => 'Admin'], function () {
@@ -44,7 +48,7 @@ Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth'], 'namespace'
4448
});
4549
```
4650

47-
5) [optional] Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar.blade.php or menu.blade.php:
51+
6) [optional] Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar.blade.php or menu.blade.php:
4852

4953
```html
5054
<li><a href="{{ url('admin/menu-item') }}"><i class="fa fa-list"></i> <span>Menu</span></a></li>
@@ -57,19 +61,19 @@ Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth'], 'namespace'
5761
1) In your terminal, run:
5862

5963
``` bash
60-
$ composer require backpack/menumanager
64+
$ composer require backpack/MenuCRUD
6165
```
6266

6367
2) Then add the service providers to your config/app.php file:
6468

6569
```
66-
'Backpack\MenuManager\MenuManagerServiceProvider',
70+
'Backpack\MenuCRUD\MenuCRUDServiceProvider',
6771
```
6872

6973
3) Publish the migration:
7074

7175
```
72-
php artisan vendor:publish --provider="Backpack\MenuManager\MenuManagerServiceProvider"
76+
php artisan vendor:publish --provider="Backpack\MenuCRUD\MenuCRUDServiceProvider"
7377
```
7478

7579
4) Run the migration to have the database table we need:
@@ -113,17 +117,17 @@ If you discover any security related issues, please email [email protected] inst
113117

114118
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
115119

116-
[ico-version]: https://img.shields.io/packagist/v/backpack/MenuManager.svg?style=flat-square
120+
[ico-version]: https://img.shields.io/packagist/v/backpack/MenuCRUD.svg?style=flat-square
117121
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
118-
[ico-travis]: https://img.shields.io/travis/Laravel-Backpack/MenuManager/master.svg?style=flat-square
119-
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/Laravel-Backpack/MenuManager.svg?style=flat-square
120-
[ico-code-quality]: https://img.shields.io/scrutinizer/g/Laravel-Backpack/MenuManager.svg?style=flat-square
121-
[ico-downloads]: https://img.shields.io/packagist/dt/backpack/MenuManager.svg?style=flat-square
122-
123-
[link-packagist]: https://packagist.org/packages/backpack/MenuManager
124-
[link-travis]: https://travis-ci.org/Laravel-Backpack/MenuManager
125-
[link-scrutinizer]: https://scrutinizer-ci.com/g/Laravel-Backpack/MenuManager/code-structure
126-
[link-code-quality]: https://scrutinizer-ci.com/g/Laravel-Backpack/MenuManager
127-
[link-downloads]: https://packagist.org/packages/backpack/MenuManager
122+
[ico-travis]: https://img.shields.io/travis/Laravel-Backpack/MenuCRUD/master.svg?style=flat-square
123+
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/Laravel-Backpack/MenuCRUD.svg?style=flat-square
124+
[ico-code-quality]: https://img.shields.io/scrutinizer/g/Laravel-Backpack/MenuCRUD.svg?style=flat-square
125+
[ico-downloads]: https://img.shields.io/packagist/dt/backpack/MenuCRUD.svg?style=flat-square
126+
127+
[link-packagist]: https://packagist.org/packages/backpack/MenuCRUD
128+
[link-travis]: https://travis-ci.org/Laravel-Backpack/MenuCRUD
129+
[link-scrutinizer]: https://scrutinizer-ci.com/g/Laravel-Backpack/MenuCRUD/code-structure
130+
[link-code-quality]: https://scrutinizer-ci.com/g/Laravel-Backpack/MenuCRUD
131+
[link-downloads]: https://packagist.org/packages/backpack/MenuCRUD
128132
[link-author]: https://github.com/tabacitu
129133
[link-contributors]: ../../contributors

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "backpack/menumanager",
2+
"name": "backpack/menucrud",
33
"type": "library",
44
"description": "An admin panel for menu items, using Backpack\\CRUD on Laravel 5.",
55
"keywords": [
66
"backpack",
7-
"MenuManager"
7+
"MenuCRUD"
88
],
9-
"homepage": "https://github.com/backpack/MenuManager",
9+
"homepage": "https://github.com/backpack/MenuCRUD",
1010
"license": "MIT",
1111
"authors": [
1212
{
@@ -28,12 +28,12 @@
2828
},
2929
"autoload": {
3030
"psr-4": {
31-
"Backpack\\MenuManager\\": "src"
31+
"Backpack\\MenuCRUD\\": "src"
3232
}
3333
},
3434
"autoload-dev": {
3535
"psr-4": {
36-
"Backpack\\MenuManager\\": "tests"
36+
"Backpack\\MenuCRUD\\": "tests"
3737
}
3838
},
3939
"scripts": {

src/MenuManagerServiceProvider.php renamed to src/MenuCRUDServiceProvider.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace Backpack\MenuManager;
3+
namespace Backpack\MenuCRUD;
44

55
use Illuminate\Support\ServiceProvider;
66
use Illuminate\Routing\Router;
77

8-
class MenuManagerServiceProvider extends ServiceProvider
8+
class MenuCRUDServiceProvider extends ServiceProvider
99
{
1010
/**
1111
* Indicates if loading of the provider is deferred.
@@ -33,9 +33,9 @@ public function boot()
3333
*/
3434
public function setupRoutes(Router $router)
3535
{
36-
$router->group(['namespace' => 'Backpack\MenuManager\app\Http\Controllers'], function ($router) {
37-
Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth'], 'namespace' => 'Admin'], function () {
38-
CRUD::resource('menu-item', 'MenuItemCrudController');
36+
$router->group(['namespace' => 'Backpack\MenuCRUD\app\Http\Controllers'], function ($router) {
37+
\Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth'], 'namespace' => 'Admin'], function () {
38+
\CRUD::resource('menu-item', 'MenuItemCrudController');
3939
});
4040
});
4141
}
@@ -47,10 +47,6 @@ public function setupRoutes(Router $router)
4747
*/
4848
public function register()
4949
{
50-
$this->app->bind('menumanager', function ($app) {
51-
return new MenuManager($app);
52-
});
53-
5450
$this->setupRoutes($this->app->router);
5551
}
5652
}

src/app/Http/Controllers/Admin/MenuItemCrudController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Backpack\MenuManager\app\Http\Controllers\Admin;
3+
namespace Backpack\MenuCRUD\app\Http\Controllers\Admin;
44

55
use App\Http\Requests;
66
use Backpack\CRUD\app\Http\Controllers\CrudController;
@@ -14,7 +14,7 @@ public function __construct()
1414
{
1515
parent::__construct();
1616

17-
$this->crud->setModel("Backpack\MenuManager\app\Models\MenuItem");
17+
$this->crud->setModel("Backpack\MenuCRUD\app\Models\MenuItem");
1818
$this->crud->setRoute('admin/menu-item');
1919
$this->crud->setEntityNameStrings('menu item', 'menu items');
2020

@@ -31,7 +31,7 @@ public function __construct()
3131
'name' => 'parent_id',
3232
'entity' => 'parent',
3333
'attribute' => 'name',
34-
'model' => "\Backpack\MenuManager\app\Models\MenuItem",
34+
'model' => "\Backpack\MenuCRUD\app\Models\MenuItem",
3535
]);
3636

3737
$this->crud->addField([
@@ -44,7 +44,7 @@ public function __construct()
4444
'name' => 'parent_id',
4545
'entity' => 'parent',
4646
'attribute' => 'name',
47-
'model' => "\Backpack\MenuManager\app\Models\MenuItem",
47+
'model' => "\Backpack\MenuCRUD\app\Models\MenuItem",
4848
]);
4949
$this->crud->addField([
5050
'name' => 'type',

src/app/Models/MenuItem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Backpack\MenuManager\app\Models;
3+
namespace Backpack\MenuCRUD\app\Models;
44

55
use Illuminate\Database\Eloquent\Model;
66
use Backpack\CRUD\CrudTrait;
@@ -14,12 +14,12 @@ class MenuItem extends Model
1414

1515
public function parent()
1616
{
17-
return $this->belongsTo('Backpack\MenuManager\app\Models\MenuItem', 'parent_id');
17+
return $this->belongsTo('Backpack\MenuCRUD\app\Models\MenuItem', 'parent_id');
1818
}
1919

2020
public function children()
2121
{
22-
return $this->hasMany('Backpack\MenuManager\app\Models\MenuItem');
22+
return $this->hasMany('Backpack\MenuCRUD\app\Models\MenuItem');
2323
}
2424

2525
public function page()

0 commit comments

Comments
 (0)