Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
7456b1f3
Commit
7456b1f3
authored
Dec 08, 2017
by
Vipul Basapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored Blog Category Module
parent
09d543ed
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
123 additions
and
134 deletions
+123
-134
BlogCategoryCreated.php
app/Events/Backend/BlogCategories/BlogCategoryCreated.php
+4
-4
BlogCategoryDeleted.php
app/Events/Backend/BlogCategories/BlogCategoryDeleted.php
+4
-4
BlogCategoryUpdated.php
app/Events/Backend/BlogCategories/BlogCategoryUpdated.php
+4
-4
BlogCategoriesController.php
...llers/Backend/BlogCategories/BlogCategoriesController.php
+26
-23
BlogCategoriesTableController.php
.../Backend/BlogCategories/BlogCategoriesTableController.php
+14
-21
BlogCategoryEventListener.php
...ners/Backend/BlogCategories/BlogCategoryEventListener.php
+6
-6
BlogCategory.php
app/Models/BlogCategories/BlogCategory.php
+1
-1
BlogCategoryAttribute.php
...BlogCategories/Traits/Attribute/BlogCategoryAttribute.php
+20
-0
BlogMapCategory.php
app/Models/BlogMapCategories/BlogMapCategory.php
+1
-2
BlogMapTag.php
app/Models/BlogMapTags/BlogMapTag.php
+1
-2
BlogTag.php
app/Models/BlogTags/BlogTag.php
+1
-1
BlogCategoriesRepository.php
...ories/Backend/BlogCategories/BlogCategoriesRepository.php
+26
-32
access.php
config/access.php
+0
-20
module.php
config/module.php
+3
-0
create.blade.php
resources/views/backend/blogcategories/create.blade.php
+1
-1
edit.blade.php
resources/views/backend/blogcategories/edit.blade.php
+1
-1
index.blade.php
resources/views/backend/blogcategories/index.blade.php
+5
-5
blogcategories-header-buttons.blade.php
...tegories/partials/blogcategories-header-buttons.blade.php
+5
-7
No files found.
app/Events/Backend/BlogCategories/BlogCategoryCreated.php
View file @
7456b1f3
...
...
@@ -14,13 +14,13 @@ class BlogCategoryCreated
/**
* @var
*/
public
$blogcategor
ies
;
public
$blogcategor
y
;
/**
* @param $blogcategor
ies
* @param $blogcategor
y
*/
public
function
__construct
(
$blogcategor
ies
)
public
function
__construct
(
$blogcategor
y
)
{
$this
->
blogcategor
ies
=
$blogcategories
;
$this
->
blogcategor
y
=
$blogcategory
;
}
}
app/Events/Backend/BlogCategories/BlogCategoryDeleted.php
View file @
7456b1f3
...
...
@@ -14,13 +14,13 @@ class BlogCategoryDeleted
/**
* @var
*/
public
$blogcategor
ies
;
public
$blogcategor
y
;
/**
* @param $blogcategor
ies
* @param $blogcategor
y
*/
public
function
__construct
(
$blogcategor
ies
)
public
function
__construct
(
$blogcategor
y
)
{
$this
->
blogcategor
ies
=
$blogcategories
;
$this
->
blogcategor
y
=
$blogcategory
;
}
}
app/Events/Backend/BlogCategories/BlogCategoryUpdated.php
View file @
7456b1f3
...
...
@@ -14,13 +14,13 @@ class BlogCategoryUpdated
/**
* @var
*/
public
$blogcategor
ies
;
public
$blogcategor
y
;
/**
* @param $blogcategor
ies
* @param $blogcategor
y
*/
public
function
__construct
(
$blogcategor
ies
)
public
function
__construct
(
$blogcategor
y
)
{
$this
->
blogcategor
ies
=
$blogcategories
;
$this
->
blogcategor
y
=
$blogcategory
;
}
}
app/Http/Controllers/Backend/BlogCategories/BlogCategoriesController.php
View file @
7456b1f3
...
...
@@ -17,21 +17,18 @@ use App\Repositories\Backend\BlogCategories\BlogCategoriesRepository;
*/
class
BlogCategoriesController
extends
Controller
{
/**
* @var BlogCategoriesRepository
*/
protected
$blogcategories
;
protected
$blogcategory
;
/**
* @param BlogCategoriesRepository $blogcategor
ies
* @param BlogCategoriesRepository $blogcategor
y
*/
public
function
__construct
(
BlogCategoriesRepository
$blogcategor
ies
)
public
function
__construct
(
BlogCategoriesRepository
$blogcategor
y
)
{
$this
->
blogcategor
ies
=
$blogcategories
;
$this
->
blogcategor
y
=
$blogcategory
;
}
/**
* @param ManageBlogCategoriesRequest $request
* @param
\App\Http\Requests\Backend\BlogCategories\
ManageBlogCategoriesRequest $request
*
* @return mixed
*/
...
...
@@ -41,7 +38,7 @@ class BlogCategoriesController extends Controller
}
/**
* @param CreateBlogCategoriesRequest $request
* @param
\App\Http\Requests\Backend\BlogCategories\
CreateBlogCategoriesRequest $request
*
* @return mixed
*/
...
...
@@ -51,52 +48,58 @@ class BlogCategoriesController extends Controller
}
/**
* @param StoreBlogCategoriesRequest $request
* @param
\App\Http\Requests\Backend\BlogCategories\
StoreBlogCategoriesRequest $request
*
* @return mixed
*/
public
function
store
(
StoreBlogCategoriesRequest
$request
)
{
$this
->
blogcategor
ies
->
create
(
$request
->
all
());
$this
->
blogcategor
y
->
create
(
$request
->
all
());
return
redirect
()
->
route
(
'admin.blogcategories.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.blogcategories.created'
));
return
redirect
()
->
route
(
'admin.blogcategories.index'
)
->
with
(
'flash_success'
,
trans
(
'alerts.backend.blogcategories.created'
));
}
/**
* @param BlogCategory $blogcategory
* @param EditBlogCategoriesRequest $request
* @param
\App\Models\BlogCategories\
BlogCategory $blogcategory
* @param
\App\Http\Requests\Backend\BlogCategories\
EditBlogCategoriesRequest $request
*
* @return mixed
*/
public
function
edit
(
BlogCategory
$blogcategory
,
EditBlogCategoriesRequest
$request
)
{
return
view
(
'backend.blogcategories.edit'
)
->
with
Blogcategory
(
$blogcategory
);
->
with
(
'blogcategory'
,
$blogcategory
);
}
/**
* @param BlogCategory $blogcategory
* @param UpdateBlogCategoriesRequest $request
* @param
\App\Models\BlogCategories\
BlogCategory $blogcategory
* @param
\App\Http\Requests\Backend\BlogCategories\
UpdateBlogCategoriesRequest $request
*
* @return mixed
*/
public
function
update
(
BlogCategory
$blogcategory
,
UpdateBlogCategoriesRequest
$request
)
{
$this
->
blogcategor
ies
->
update
(
$blogcategory
,
$request
->
all
());
$this
->
blogcategor
y
->
update
(
$blogcategory
,
$request
->
all
());
return
redirect
()
->
route
(
'admin.blogcategories.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.blogcategories.updated'
));
return
redirect
()
->
route
(
'admin.blogcategories.index'
)
->
with
(
'flash_success'
,
trans
(
'alerts.backend.blogcategories.updated'
));
}
/**
* @param BlogCategory $blogcategory
* @param DeleteBlogCategoriesRequest $request
* @param
\App\Models\BlogCategories\
BlogCategory $blogcategory
* @param
\App\Http\Requests\Backend\BlogCategories\
DeleteBlogCategoriesRequest $request
*
* @return mixed
*/
public
function
destroy
(
BlogCategory
$blogcategory
,
DeleteBlogCategoriesRequest
$request
)
{
$this
->
blogcategor
ies
->
delete
(
$blogcategory
);
$this
->
blogcategor
y
->
delete
(
$blogcategory
);
return
redirect
()
->
route
(
'admin.blogcategories.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.blogcategories.deleted'
));
return
redirect
()
->
route
(
'admin.blogcategories.index'
)
->
with
(
'flash_success'
,
trans
(
'alerts.backend.blogcategories.deleted'
));
}
}
app/Http/Controllers/Backend/BlogCategories/BlogCategoriesTableController.php
View file @
7456b1f3
...
...
@@ -13,43 +13,36 @@ use Yajra\DataTables\Facades\DataTables;
*/
class
BlogCategoriesTableController
extends
Controller
{
/**
* @var BlogCategoriesRepository
*/
protected
$blogcategories
;
protected
$blogcategory
;
/**
* @param BlogCategoriesRepository $cmspages
* @param
\App\Repositories\Backend\BlogCategories\
BlogCategoriesRepository $cmspages
*/
public
function
__construct
(
BlogCategoriesRepository
$blogcategor
ies
)
public
function
__construct
(
BlogCategoriesRepository
$blogcategor
y
)
{
$this
->
blogcategor
ies
=
$blogcategories
;
$this
->
blogcategor
y
=
$blogcategory
;
}
/**
* @param ManageBlogCategoriesRequest $request
* @param
\App\Http\Requests\Backend\BlogCategories\
ManageBlogCategoriesRequest $request
*
* @return mixed
*/
public
function
__invoke
(
ManageBlogCategoriesRequest
$request
)
{
return
Datatables
::
of
(
$this
->
blogcategor
ies
->
getForDataTable
())
return
Datatables
::
of
(
$this
->
blogcategor
y
->
getForDataTable
())
->
escapeColumns
([
'name'
])
->
addColumn
(
'status'
,
function
(
$blogcategories
)
{
if
(
$blogcategories
->
status
)
{
return
'<span class="label label-success">Active</span>'
;
}
return
'<span class="label label-danger">Inactive</span>'
;
->
addColumn
(
'status'
,
function
(
$blogcategory
)
{
return
$blogcategory
->
status_label
;
})
->
addColumn
(
'created_by'
,
function
(
$blogcategor
ies
)
{
return
$blogcategor
ies
->
user_name
;
->
addColumn
(
'created_by'
,
function
(
$blogcategor
y
)
{
return
$blogcategor
y
->
user_name
;
})
->
addColumn
(
'created_at'
,
function
(
$blogcategor
ies
)
{
return
Carbon
::
parse
(
$blogcategor
ies
->
created_at
)
->
toDateString
();
->
addColumn
(
'created_at'
,
function
(
$blogcategor
y
)
{
return
Carbon
::
parse
(
$blogcategor
y
->
created_at
)
->
toDateString
();
})
->
addColumn
(
'actions'
,
function
(
$blogcategor
ies
)
{
return
$blogcategor
ies
->
action_buttons
;
->
addColumn
(
'actions'
,
function
(
$blogcategor
y
)
{
return
$blogcategor
y
->
action_buttons
;
})
->
make
(
true
);
}
...
...
app/Listeners/Backend/BlogCategories/BlogCategoryEventListener.php
View file @
7456b1f3
...
...
@@ -18,8 +18,8 @@ class BlogCategoryEventListener
public
function
onCreated
(
$event
)
{
history
()
->
withType
(
$this
->
history_slug
)
->
withEntity
(
$event
->
blogcategor
ies
->
id
)
->
withText
(
'trans("history.backend.blogcategories.created") <strong>'
.
$event
->
blogcategor
ies
->
name
.
'</strong>'
)
->
withEntity
(
$event
->
blogcategor
y
->
id
)
->
withText
(
'trans("history.backend.blogcategories.created") <strong>'
.
$event
->
blogcategor
y
->
name
.
'</strong>'
)
->
withIcon
(
'plus'
)
->
withClass
(
'bg-green'
)
->
log
();
...
...
@@ -31,8 +31,8 @@ class BlogCategoryEventListener
public
function
onUpdated
(
$event
)
{
history
()
->
withType
(
$this
->
history_slug
)
->
withEntity
(
$event
->
blogcategor
ies
->
id
)
->
withText
(
'trans("history.backend.blogcategories.updated") <strong>'
.
$event
->
blogcategor
ies
->
name
.
'</strong>'
)
->
withEntity
(
$event
->
blogcategor
y
->
id
)
->
withText
(
'trans("history.backend.blogcategories.updated") <strong>'
.
$event
->
blogcategor
y
->
name
.
'</strong>'
)
->
withIcon
(
'save'
)
->
withClass
(
'bg-aqua'
)
->
log
();
...
...
@@ -44,8 +44,8 @@ class BlogCategoryEventListener
public
function
onDeleted
(
$event
)
{
history
()
->
withType
(
$this
->
history_slug
)
->
withEntity
(
$event
->
blogcategor
ies
->
id
)
->
withText
(
'trans("history.backend.blogcategories.deleted") <strong>'
.
$event
->
blogcategor
ies
->
name
.
'</strong>'
)
->
withEntity
(
$event
->
blogcategor
y
->
id
)
->
withText
(
'trans("history.backend.blogcategories.deleted") <strong>'
.
$event
->
blogcategor
y
->
name
.
'</strong>'
)
->
withIcon
(
'trash'
)
->
withClass
(
'bg-maroon'
)
->
log
();
...
...
app/Models/BlogCategories/BlogCategory.php
View file @
7456b1f3
...
...
@@ -29,6 +29,6 @@ class BlogCategory extends BaseModel
public
function
__construct
(
array
$attributes
=
[])
{
parent
::
__construct
(
$attributes
);
$this
->
table
=
config
(
'
access.blog_categories_
table'
);
$this
->
table
=
config
(
'
module.blog_categories.
table'
);
}
}
app/Models/BlogCategories/Traits/Attribute/BlogCategoryAttribute.php
View file @
7456b1f3
...
...
@@ -17,4 +17,24 @@ trait BlogCategoryAttribute
'
.
$this
->
getDeleteButtonAttribute
(
'delete-blog-category'
,
'admin.blogcategories.destroy'
)
.
'
</div>'
;
}
/**
* @return string
*/
public
function
getStatusLabelAttribute
()
{
if
(
$this
->
isActive
())
{
return
"<label class='label label-success'>"
.
trans
(
'labels.general.active'
)
.
'</label>'
;
}
return
"<label class='label label-danger'>"
.
trans
(
'labels.general.inactive'
)
.
'</label>'
;
}
/**
* @return bool
*/
public
function
isActive
()
{
return
$this
->
status
==
1
;
}
}
app/Models/BlogMapCategories/BlogMapCategory.php
View file @
7456b1f3
...
...
@@ -11,11 +11,10 @@ class BlogMapCategory extends BaseModel
*
* @var string
*/
protected
$table
;
protected
$table
=
'blog_map_categories'
;
public
function
__construct
(
array
$attributes
=
[])
{
parent
::
__construct
(
$attributes
);
$this
->
table
=
config
(
'access.blog_map_categories_table'
);
}
}
app/Models/BlogMapTags/BlogMapTag.php
View file @
7456b1f3
...
...
@@ -11,11 +11,10 @@ class BlogMapTag extends BaseModel
*
* @var string
*/
protected
$table
;
protected
$table
=
'blog_map_tags'
;
public
function
__construct
(
array
$attributes
=
[])
{
parent
::
__construct
(
$attributes
);
$this
->
table
=
config
(
'access.blog_map_tags'
);
}
}
app/Models/BlogTags/BlogTag.php
View file @
7456b1f3
...
...
@@ -29,6 +29,6 @@ class BlogTag extends BaseModel
public
function
__construct
(
array
$attributes
=
[])
{
parent
::
__construct
(
$attributes
);
$this
->
table
=
config
(
'
access.blog_tags_
table'
);
$this
->
table
=
config
(
'
module.blog_tags.
table'
);
}
}
app/Repositories/Backend/BlogCategories/BlogCategoriesRepository.php
View file @
7456b1f3
...
...
@@ -26,13 +26,13 @@ class BlogCategoriesRepository extends BaseRepository
public
function
getForDataTable
()
{
return
$this
->
query
()
->
leftjoin
(
config
(
'access.users_table'
),
config
(
'access.users_table'
)
.
'.id'
,
'='
,
config
(
'
access.blog_categories_
table'
)
.
'.created_by'
)
->
leftjoin
(
config
(
'access.users_table'
),
config
(
'access.users_table'
)
.
'.id'
,
'='
,
config
(
'
module.blog_categories.
table'
)
.
'.created_by'
)
->
select
([
config
(
'
access.blog_categories_
table'
)
.
'.id'
,
config
(
'
access.blog_categories_
table'
)
.
'.name'
,
config
(
'
access.blog_categories_
table'
)
.
'.status'
,
config
(
'
access.blog_categories_
table'
)
.
'.created_by'
,
config
(
'
access.blog_categories_
table'
)
.
'.created_at'
,
config
(
'
module.blog_categories.
table'
)
.
'.id'
,
config
(
'
module.blog_categories.
table'
)
.
'.name'
,
config
(
'
module.blog_categories.
table'
)
.
'.status'
,
config
(
'
module.blog_categories.
table'
)
.
'.created_by'
,
config
(
'
module.blog_categories.
table'
)
.
'.created_at'
,
config
(
'access.users_table'
)
.
'.first_name as user_name'
,
]);
}
...
...
@@ -40,7 +40,7 @@ class BlogCategoriesRepository extends BaseRepository
/**
* @param array $input
*
* @throws GeneralException
* @throws
\App\Exceptions\
GeneralException
*
* @return bool
*/
...
...
@@ -49,16 +49,13 @@ class BlogCategoriesRepository extends BaseRepository
if
(
$this
->
query
()
->
where
(
'name'
,
$input
[
'name'
])
->
first
())
{
throw
new
GeneralException
(
trans
(
'exceptions.backend.blogcategories.already_exists'
));
}
DB
::
transaction
(
function
()
use
(
$input
)
{
$blogcategories
=
self
::
MODEL
;
$blogcategories
=
new
$blogcategories
();
$blogcategories
->
name
=
$input
[
'name'
];
$blogcategories
->
status
=
(
isset
(
$input
[
'status'
])
&&
$input
[
'status'
]
==
1
)
?
1
:
0
;
$blogcategories
->
created_by
=
access
()
->
user
()
->
id
;
$input
[
'status'
]
=
isset
(
$input
[
'status'
])
?
1
:
0
;
$input
[
'created_by'
]
=
access
()
->
user
()
->
id
;
if
(
$blogcategor
ies
->
save
(
))
{
event
(
new
BlogCategoryCreated
(
$blogcategor
ies
));
if
(
$blogcategor
y
=
BlogCategory
::
create
(
$input
))
{
event
(
new
BlogCategoryCreated
(
$blogcategor
y
));
return
true
;
}
...
...
@@ -68,44 +65,41 @@ class BlogCategoriesRepository extends BaseRepository
}
/**
* @param
Model $permission
* @param
\App\Models\BlogCategories\BlogCategory $blogcategory
* @param $input
*
* @throws GeneralException
* @throws
\App\Exceptions\
GeneralException
*
* return bool
*/
public
function
update
(
Model
$blogcategories
,
array
$input
)
public
function
update
(
BlogCategory
$blogcategory
,
array
$input
)
{
if
(
$this
->
query
()
->
where
(
'name'
,
$input
[
'name'
])
->
where
(
'id'
,
'!='
,
$blogcategor
ies
->
id
)
->
first
())
{
if
(
$this
->
query
()
->
where
(
'name'
,
$input
[
'name'
])
->
where
(
'id'
,
'!='
,
$blogcategor
y
->
id
)
->
first
())
{
throw
new
GeneralException
(
trans
(
'exceptions.backend.blogcategories.already_exists'
));
}
$blogcategories
->
name
=
$input
[
'name'
];
$blogcategories
->
status
=
(
isset
(
$input
[
'status'
])
&&
$input
[
'status'
]
==
1
)
?
1
:
0
;
$blogcategories
->
updated_by
=
access
()
->
user
()
->
id
;
DB
::
transaction
(
function
()
use
(
$blogcategories
,
$input
)
{
if
(
$blogcategories
->
save
())
{
event
(
new
BlogCategoryUpdated
(
$blogcategories
));
DB
::
transaction
(
function
()
use
(
$blogcategory
,
$input
)
{
$input
[
'status'
]
=
isset
(
$input
[
'status'
])
?
1
:
0
;
$input
[
'updated_by'
]
=
access
()
->
user
()
->
id
;
if
(
$blogcategory
->
update
(
$input
))
{
event
(
new
BlogCategoryUpdated
(
$blogcategory
));
return
true
;
}
throw
new
GeneralException
(
trans
(
'exceptions.backend.blogcategories.update_error'
)
);
throw
new
GeneralException
(
trans
(
'exceptions.backend.blogcategories.update_error'
));
});
}
/**
* @param
Model
$blogcategory
* @param
\App\Models\BlogCategories\BlogCategory
$blogcategory
*
* @throws GeneralException
* @throws
\App\Exceptions\
GeneralException
*
* @return bool
*/
public
function
delete
(
Model
$blogcategory
)
public
function
delete
(
BlogCategory
$blogcategory
)
{
DB
::
transaction
(
function
()
use
(
$blogcategory
)
{
if
(
$blogcategory
->
delete
())
{
...
...
config/access.php
View file @
7456b1f3
...
...
@@ -70,26 +70,6 @@ return [
*/
'history_types_table'
=>
'history_types'
,
/*
* Blog Catagories table used to store Blog Catagory
*/
'blog_categories_table'
=>
'blog_categories'
,
/*
* Blog Tags table used to store Blog Tag
*/
'blogs_table'
=>
'blogs'
,
/*
* Blog Tags table used to store Blog Tag
*/
'blog_map_categories_table'
=>
'blog_map_categories'
,
/*
* Blog Tags table used to store Blog Tag
*/
'blog_map_tags_table'
=>
'blog_map_tags'
,
/*
* Notifications table used to store user notification
*/
...
...
config/module.php
View file @
7456b1f3
...
...
@@ -11,5 +11,8 @@ return [
],
'blog_tags'
=>
[
'table'
=>
'blog_tags'
],
'blog_categories'
=>
[
'table'
=>
'blog_categories'
]
];
resources/views/backend/blogcategories/create.blade.php
View file @
7456b1f3
...
...
@@ -17,7 +17,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.blogcategories.create') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
includ
es.partials.blogcategories-header-buttons')
@include('backend.
blogcategori
es.partials.blogcategories-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
...
...
resources/views/backend/blogcategories/edit.blade.php
View file @
7456b1f3
...
...
@@ -17,7 +17,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.blogcategories.edit') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
includ
es.partials.blogcategories-header-buttons')
@include('backend.
blogcategori
es.partials.blogcategories-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
...
...
resources/views/backend/blogcategories/index.blade.php
View file @
7456b1f3
...
...
@@ -12,7 +12,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.blogcategories.management') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
includ
es.partials.blogcategories-header-buttons')
@include('backend.
blogcategori
es.partials.blogcategories-header-buttons')
</div>
</div><!-- /.box-header -->
...
...
@@ -74,10 +74,10 @@
type: 'post'
},
columns: [
{data: 'name', name: '
{
{config('
access.blog_categories_
table')}}.name'
}
,
{data: 'status', name: '
{
{config('
access.blog_categories_
table')}}.status'
}
,
{data: 'created_by', name: '
{
{config('
access.blog_categories_
table')}}.created_by'
}
,
{data: 'created_at', name: '
{
{config('
access.blog_categories_
table')}}.created_at'
}
,
{data: 'name', name: '
{
{config('
module.blog_categories.
table')}}.name'
}
,
{data: 'status', name: '
{
{config('
module.blog_categories.
table')}}.status'
}
,
{data: 'created_by', name: '
{
{config('
module.blog_categories.
table')}}.created_by'
}
,
{data: 'created_at', name: '
{
{config('
module.blog_categories.
table')}}.created_at'
}
,
{data: 'actions', name: 'actions', searchable: false, sortable: false}
],
order: [[3, "
asc
"]],
...
...
resources/views/backend/
includes/partials/blogtag
s-header-buttons.blade.php
→
resources/views/backend/
blogcategories/partials/blogcategorie
s-header-buttons.blade.php
100755 → 100644
View file @
7456b1f3
<!--Action Button-->
@if(Active::checkUriPattern('admin/blog
tag
s'))
@if(Active::checkUriPattern('admin/blog
categorie
s'))
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-warning btn-flat dropdown-toggle"
data-toggle=
"dropdown"
>
Export
<span
class=
"caret"
></span>
...
...
@@ -21,11 +21,9 @@
<span
class=
"sr-only"
>
Toggle Dropdown
</span>
</button>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li><a
href=
"{{route('admin.blog
tags.index')}}"
><i
class=
"fa fa-list-ul"
></i>
{{trans('menus.backend.blogtag
s.all')}}
</a></li>
@permission('create-blog-
tag
')
<li><a
href=
"{{route('admin.blog
tags.create')}}"
><i
class=
"fa fa-plus"
></i>
{{trans('menus.backend.blogtag
s.create')}}
</a></li>
<li><a
href=
"{{route('admin.blog
categories.index')}}"
><i
class=
"fa fa-list-ul"
></i>
{{trans('menus.backend.blogcategorie
s.all')}}
</a></li>
@permission('create-blog-
category
')
<li><a
href=
"{{route('admin.blog
categories.create')}}"
><i
class=
"fa fa-plus"
></i>
{{trans('menus.backend.blogcategorie
s.create')}}
</a></li>
@endauth
</ul>
</div>
<div
class=
"clearfix"
></div>
</div>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment