Skip to content

Commit

Permalink
rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
vyuldashev committed Aug 24, 2018
1 parent 8f515ed commit f39cddf
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function tools()
{
return [
// ...
new \Vyuldashev\NovaSpatiePermission\NovaSpatiePermissionTool(),
new \Vyuldashev\NovaPermission\NovaPermissionTool(),
];
}
```
Expand All @@ -43,8 +43,8 @@ public function fields(Request $request)
{
return [
// ...
MorphToMany::make('Roles', 'roles', \Vyuldashev\NovaSpatiePermission\Role::class),
MorphToMany::make('Permissions', 'permissions', \Vyuldashev\NovaSpatiePermission\Permission::class),
MorphToMany::make('Roles', 'roles', \Vyuldashev\NovaPermission\Role::class),
MorphToMany::make('Permissions', 'permissions', \Vyuldashev\NovaPermission\Permission::class),
];
}
```
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vyuldashev/nova-spatie-permission",
"name": "vyuldashev/nova-permission",
"description": "A Laravel Nova tool for Spatie's Permission library.",
"keywords": [
"laravel",
Expand All @@ -13,13 +13,13 @@
},
"autoload": {
"psr-4": {
"Vyuldashev\\NovaSpatiePermission\\": "src/"
"Vyuldashev\\NovaPermission\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Vyuldashev\\NovaSpatiePermission\\ToolServiceProvider"
"Vyuldashev\\NovaPermission\\ToolServiceProvider"
]
}
},
Expand Down
5 changes: 2 additions & 3 deletions resources/views/navigation.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<router-link tag="h3" :to="{name: 'spatie-laravel-permission'}"
class="cursor-pointer flex items-center font-normal dim text-white mb-6 text-base no-underline">
<h3 class="flex items-center font-normal text-white mb-6 text-base no-underline">
<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="#B3C1D1"
d="M7 10V7a5 5 0 1 1 10 0v3h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h2zm2 0h6V7a3 3 0 0 0-6 0v3zm-4 2v8h14v-8H5zm7 2a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1z"/>
</svg>
<span class="sidebar-label">
Roles & Permissions
</span>
</router-link>
</h3>

<ul class="list-reset mb-8">
<li class="leading-wide mb-4 text-sm">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Vyuldashev\NovaSpatiePermission;
namespace Vyuldashev\NovaPermission;

use Laravel\Nova\Nova;
use Laravel\Nova\Tool;

class NovaSpatiePermissionTool extends Tool
class NovaPermissionTool extends Tool
{
/**
* Perform any tasks that need to happen when the tool is booted.
Expand All @@ -14,9 +14,6 @@ class NovaSpatiePermissionTool extends Tool
*/
public function boot()
{
Nova::script('nova-spatie-laravel-permission-tool', __DIR__.'/../dist/js/tool.js');
Nova::style('nova-spatie-laravel-permission-tool', __DIR__.'/../dist/css/tool.css');

Nova::resources([
Role::class,
Permission::class,
Expand All @@ -30,6 +27,6 @@ public function boot()
*/
public function renderNavigation()
{
return view('nova-spatie-laravel-permission-tool::navigation');
return view('nova-permission-tool::navigation');
}
}
2 changes: 1 addition & 1 deletion src/Permission.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Vyuldashev\NovaSpatiePermission;
namespace Vyuldashev\NovaPermission;

use Laravel\Nova\Resource;
use Laravel\Nova\Fields\ID;
Expand Down
2 changes: 1 addition & 1 deletion src/Role.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Vyuldashev\NovaSpatiePermission;
namespace Vyuldashev\NovaPermission;

use Laravel\Nova\Resource;
use Laravel\Nova\Fields\ID;
Expand Down
4 changes: 2 additions & 2 deletions src/ToolServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Vyuldashev\NovaSpatiePermission;
namespace Vyuldashev\NovaPermission;

use Laravel\Nova\Nova;
use Laravel\Nova\Events\ServingNova;
Expand All @@ -15,7 +15,7 @@ class ToolServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->loadViewsFrom(__DIR__.'/../resources/views', 'nova-spatie-laravel-permission-tool');
$this->loadViewsFrom(__DIR__.'/../resources/views', 'nova-permission-tool');

$this->app->booted(function () {
$this->routes();
Expand Down

0 comments on commit f39cddf

Please sign in to comment.