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
bb0b8d37
Commit
bb0b8d37
authored
Nov 25, 2017
by
Vipul Basapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed CmsPages To Pages Module
parent
0976330d
Changes
37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
3294 additions
and
264 deletions
+3294
-264
PageCreated.php
app/Events/Backend/Pages/PageCreated.php
+26
-0
PageDeleted.php
app/Events/Backend/Pages/PageDeleted.php
+26
-0
PageUpdated.php
app/Events/Backend/Pages/PageUpdated.php
+26
-0
CMSPagesController.php
app/Http/Controllers/Backend/CMSPages/CMSPagesController.php
+0
-102
PagesController.php
app/Http/Controllers/Backend/Pages/PagesController.php
+102
-0
PagesTableController.php
app/Http/Controllers/Backend/Pages/PagesTableController.php
+56
-0
CreatePageRequest.php
app/Http/Requests/Backend/Pages/CreatePageRequest.php
+4
-4
DeletePageRequest.php
app/Http/Requests/Backend/Pages/DeletePageRequest.php
+4
-4
EditPageRequest.php
app/Http/Requests/Backend/Pages/EditPageRequest.php
+4
-4
ManagePageRequest.php
app/Http/Requests/Backend/Pages/ManagePageRequest.php
+4
-4
StorePageRequest.php
app/Http/Requests/Backend/Pages/StorePageRequest.php
+4
-4
UpdatePageRequest.php
app/Http/Requests/Backend/Pages/UpdatePageRequest.php
+4
-4
Page.php
app/Models/Page/Page.php
+5
-5
PageAttribute.php
app/Models/Page/Traits/Attribute/PageAttribute.php
+5
-5
PagesRepository.php
app/Repositories/Backend/Pages/PagesRepository.php
+128
-0
access.php
config/access.php
+1
-1
2017_11_02_060149_create_pages_table.php
database/migrations/2017_11_02_060149_create_pages_table.php
+3
-3
PermissionTableSeeder.php
database/seeds/Access/PermissionTableSeeder.php
+9
-9
DatabaseSeeder.php
database/seeds/DatabaseSeeder.php
+1
-1
PagesTableSeeder.php
database/seeds/PagesTableSeeder.php
+6
-6
access.log
public/access.log
+2767
-0
1509470025_1-Vpk_qBCr1cDRpLv8SNv3oQ.jpeg
...kend/blog_images/1509470025_1-Vpk_qBCr1cDRpLv8SNv3oQ.jpeg
+0
-0
admin.js
public/js/backend/admin.js
+2
-2
mix-manifest.json
public/mix-manifest.json
+7
-7
alerts.php
resources/lang/en/alerts.php
+4
-4
exceptions.php
resources/lang/en/exceptions.php
+6
-6
history.php
resources/lang/en/history.php
+1
-1
labels.php
resources/lang/en/labels.php
+5
-5
menus.php
resources/lang/en/menus.php
+6
-6
validation.php
resources/lang/en/validation.php
+1
-1
pages-header-buttons.blade.php
.../backend/includes/partials/pages-header-buttons.blade.php
+4
-4
sidebar.blade.php
resources/views/backend/includes/sidebar.blade.php
+4
-4
create.blade.php
resources/views/backend/pages/create.blade.php
+21
-21
edit.blade.php
resources/views/backend/pages/edit.blade.php
+20
-20
index.blade.php
resources/views/backend/pages/index.blade.php
+17
-17
Dashboard.php
routes/Backend/Dashboard.php
+0
-10
Pages.php
routes/Backend/Pages.php
+11
-0
No files found.
app/Events/Backend/
CMSPages/CMS
PageCreated.php
→
app/Events/Backend/
Pages/
PageCreated.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Events\Backend\
CMS
Pages
;
namespace
App\Events\Backend\Pages
;
use
Illuminate\Queue\SerializesModels
;
/**
* Class
CMS
PageCreated.
* Class PageCreated.
*/
class
CMS
PageCreated
class
PageCreated
{
use
SerializesModels
;
/**
* @var
*/
public
$
cmspages
;
public
$
page
;
/**
* @param $
cmspages
* @param $
page
*/
public
function
__construct
(
$
cmspages
)
public
function
__construct
(
$
page
)
{
$this
->
cmspages
=
$cmspages
;
$this
->
page
=
$page
;
}
}
app/Events/Backend/
CMSPages/CMS
PageDeleted.php
→
app/Events/Backend/
Pages/
PageDeleted.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Events\Backend\
CMS
Pages
;
namespace
App\Events\Backend\Pages
;
use
Illuminate\Queue\SerializesModels
;
/**
* Class
CMS
PageDeleted.
* Class PageDeleted.
*/
class
CMS
PageDeleted
class
PageDeleted
{
use
SerializesModels
;
/**
* @var
*/
public
$
cmspages
;
public
$
page
;
/**
* @param $
cmspages
* @param $
page
*/
public
function
__construct
(
$
cmspages
)
public
function
__construct
(
$
page
)
{
$this
->
cmspages
=
$cmspages
;
$this
->
page
=
$page
;
}
}
app/Events/Backend/
CMSPages/CMS
PageUpdated.php
→
app/Events/Backend/
Pages/
PageUpdated.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Events\Backend\
CMS
Pages
;
namespace
App\Events\Backend\Pages
;
use
Illuminate\Queue\SerializesModels
;
/**
* Class
CMS
PageUpdated.
* Class PageUpdated.
*/
class
CMS
PageUpdated
class
PageUpdated
{
use
SerializesModels
;
/**
* @var
*/
public
$
cmspages
;
public
$
page
;
/**
* @param $
cmspages
* @param $
page
*/
public
function
__construct
(
$
cmspages
)
public
function
__construct
(
$
page
)
{
$this
->
cmspages
=
$cmspages
;
$this
->
page
=
$page
;
}
}
app/Http/Controllers/Backend/CMSPages/CMSPagesController.php
deleted
100755 → 0
View file @
0976330d
<?php
namespace
App\Http\Controllers\Backend\CMSPages
;
use
App\Http\Controllers\Controller
;
use
App\Http\Requests\Backend\CMSPages\CreateCMSPagesRequest
;
use
App\Http\Requests\Backend\CMSPages\DeleteCMSPagesRequest
;
use
App\Http\Requests\Backend\CMSPages\EditCMSPagesRequest
;
use
App\Http\Requests\Backend\CMSPages\ManageCMSPagesRequest
;
use
App\Http\Requests\Backend\CMSPages\StoreCMSPagesRequest
;
use
App\Http\Requests\Backend\CMSPages\UpdateCMSPagesRequest
;
use
App\Models\CMSPages\CMSPage
;
use
App\Repositories\Backend\CMSPages\CMSPagesRepository
;
/**
* Class CMSPagesController.
*/
class
CMSPagesController
extends
Controller
{
/**
* @var CMSPagesRepository
*/
protected
$cmspages
;
/**
* @param CMSPagesRepository $cmspages
*/
public
function
__construct
(
CMSPagesRepository
$cmspages
)
{
$this
->
cmspages
=
$cmspages
;
}
/**
* @param ManageCMSPagesRequest $request
*
* @return mixed
*/
public
function
index
(
ManageCMSPagesRequest
$request
)
{
return
view
(
'backend.cmspages.index'
);
}
/**
* @param CreateCMSPagesRequest $request
*
* @return mixed
*/
public
function
create
(
CreateCMSPagesRequest
$request
)
{
return
view
(
'backend.cmspages.create'
);
}
/**
* @param StoreCMSPagesRequest $request
*
* @return mixed
*/
public
function
store
(
StoreCMSPagesRequest
$request
)
{
$this
->
cmspages
->
create
(
$request
->
all
());
return
redirect
()
->
route
(
'admin.cmspages.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.cmspages.created'
));
}
/**
* @param CMSPage $cmspage
* @param EditCMSPagesRequest $request
*
* @return mixed
*/
public
function
edit
(
CMSPage
$cmspage
,
EditCMSPagesRequest
$request
)
{
return
view
(
'backend.cmspages.edit'
)
->
withCmspage
(
$cmspage
);
}
/**
* @param CMSPage $cmspage
* @param EditCMSPagesRequest $request
*
* @return mixed
*/
public
function
update
(
CMSPage
$cmspage
,
UpdateCMSPagesRequest
$request
)
{
$this
->
cmspages
->
update
(
$cmspage
,
$request
->
all
());
return
redirect
()
->
route
(
'admin.cmspages.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.cmspages.updated'
));
}
/**
* @param Permission $permission
* @param DeleteCMSPagesRequest $request
*
* @return mixed
*/
public
function
destroy
(
CMSPage
$cmspage
,
DeleteCMSPagesRequest
$request
)
{
$this
->
cmspages
->
delete
(
$cmspage
);
return
redirect
()
->
route
(
'admin.cmspages.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.cmspages.deleted'
));
}
}
app/Http/Controllers/Backend/Pages/PagesController.php
0 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Controllers\Backend\Pages
;
use
App\Models\Page\Page
;
use
App\Http\Controllers\Controller
;
use
App\Repositories\Backend\Pages\PagesRepository
;
use
App\Http\Requests\Backend\Pages\EditPageRequest
;
use
App\Http\Requests\Backend\Pages\StorePageRequest
;
use
App\Http\Requests\Backend\Pages\CreatePageRequest
;
use
App\Http\Requests\Backend\Pages\DeletePageRequest
;
use
App\Http\Requests\Backend\Pages\ManagePageRequest
;
use
App\Http\Requests\Backend\Pages\UpdatePageRequest
;
/**
* Class PagesController.
*/
class
PagesController
extends
Controller
{
/**
* @var PagesRepository
*/
protected
$pages
;
/**
* @param PagesRepository $pages
*/
public
function
__construct
(
PagesRepository
$pages
)
{
$this
->
pages
=
$pages
;
}
/**
* @param ManagePageRequest $request
*
* @return mixed
*/
public
function
index
(
ManagePageRequest
$request
)
{
return
view
(
'backend.pages.index'
);
}
/**
* @param CreatePageRequest $request
*
* @return mixed
*/
public
function
create
(
CreatePageRequest
$request
)
{
return
view
(
'backend.pages.create'
);
}
/**
* @param StorePageRequest $request
*
* @return mixed
*/
public
function
store
(
StorePageRequest
$request
)
{
$this
->
pages
->
create
(
$request
->
all
());
return
redirect
()
->
route
(
'admin.pages.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.pages.created'
));
}
/**
* @param Page $page
* @param EditPageRequest $request
*
* @return mixed
*/
public
function
edit
(
Page
$page
,
EditPageRequest
$request
)
{
return
view
(
'backend.pages.edit'
)
->
withCmspage
(
$page
);
}
/**
* @param Page $page
* @param UpdatePageRequest $request
*
* @return mixed
*/
public
function
update
(
Page
$page
,
UpdatePageRequest
$request
)
{
$this
->
pages
->
update
(
$page
,
$request
->
all
());
return
redirect
()
->
route
(
'admin.pages.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.pages.updated'
));
}
/**
* @param Page $page
* @param DeletePageRequest $request
*
* @return mixed
*/
public
function
destroy
(
Page
$page
,
DeletePageRequest
$request
)
{
$this
->
pages
->
delete
(
$page
);
return
redirect
()
->
route
(
'admin.pages.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.pages.deleted'
));
}
}
app/Http/Controllers/Backend/
CMSPages/CMS
PagesTableController.php
→
app/Http/Controllers/Backend/
Pages/
PagesTableController.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Controllers\Backend\
CMS
Pages
;
namespace
App\Http\Controllers\Backend\Pages
;
use
App\Http\Controllers\Controller
;
use
App\Http\Requests\Backend\CMSPages\ManageCMSPagesRequest
;
use
App\Repositories\Backend\CMSPages\CMSPagesRepository
;
use
Carbon\Carbon
;
use
App\Http\Controllers\Controller
;
use
Yajra\DataTables\Facades\DataTables
;
use
App\Repositories\Backend\Pages\PagesRepository
;
use
App\Http\Requests\Backend\Pages\ManagePageRequest
;
/**
* Class
CMS
PagesTableController.
* Class PagesTableController.
*/
class
CMS
PagesTableController
extends
Controller
class
PagesTableController
extends
Controller
{
/**
* @var
CMS
PagesRepository
* @var PagesRepository
*/
protected
$
cms
pages
;
protected
$pages
;
/**
* @param
CMSPagesRepository $cms
pages
* @param
PagesRepository $
pages
*/
public
function
__construct
(
CMSPagesRepository
$cms
pages
)
public
function
__construct
(
PagesRepository
$
pages
)
{
$this
->
cmspages
=
$cms
pages
;
$this
->
pages
=
$
pages
;
}
/**
* @param Manage
CMSPages
Request $request
* @param Manage
Page
Request $request
*
* @return mixed
*/
public
function
__invoke
(
Manage
CMSPages
Request
$request
)
public
function
__invoke
(
Manage
Page
Request
$request
)
{
return
Datatables
::
of
(
$this
->
cms
pages
->
getForDataTable
())
return
Datatables
::
of
(
$this
->
pages
->
getForDataTable
())
->
escapeColumns
([
'title'
])
->
addColumn
(
'status'
,
function
(
$
cms
pages
)
{
if
(
$
cms
pages
->
status
)
{
->
addColumn
(
'status'
,
function
(
$pages
)
{
if
(
$pages
->
status
)
{
return
'<span class="label label-success">Active</span>'
;
}
return
'<span class="label label-danger">Inactive</span>'
;
})
->
addColumn
(
'created_at'
,
function
(
$
cms
pages
)
{
return
Carbon
::
parse
(
$
cms
pages
->
created_at
)
->
toDateString
();
->
addColumn
(
'created_at'
,
function
(
$pages
)
{
return
Carbon
::
parse
(
$pages
->
created_at
)
->
toDateString
();
})
->
addColumn
(
'updated_at'
,
function
(
$
cms
pages
)
{
return
Carbon
::
parse
(
$
cms
pages
->
updated_at
)
->
toDateString
();
->
addColumn
(
'updated_at'
,
function
(
$pages
)
{
return
Carbon
::
parse
(
$pages
->
updated_at
)
->
toDateString
();
})
->
addColumn
(
'actions'
,
function
(
$
cms
pages
)
{
return
$
cms
pages
->
action_buttons
;
->
addColumn
(
'actions'
,
function
(
$pages
)
{
return
$pages
->
action_buttons
;
})
->
make
(
true
);
}
...
...
app/Http/Requests/Backend/
CMSPages/EditCMSPages
Request.php
→
app/Http/Requests/Backend/
Pages/CreatePage
Request.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Requests\Backend\
CMS
Pages
;
namespace
App\Http\Requests\Backend\Pages
;
use
App\Http\Requests\Request
;
/**
* Class
EditCMSPages
Request.
* Class
CreatePage
Request.
*/
class
EditCMSPages
Request
extends
Request
class
CreatePage
Request
extends
Request
{
/**
* Determine if the user is authorized to make this request.
...
...
@@ -16,7 +16,7 @@ class EditCMSPagesRequest extends Request
*/
public
function
authorize
()
{
return
access
()
->
allow
(
'
edit-cms-pages
'
);
return
access
()
->
allow
(
'
create-page
'
);
}
/**
...
...
app/Http/Requests/Backend/
CMSPages/ManageCMSPages
Request.php
→
app/Http/Requests/Backend/
Pages/DeletePage
Request.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Requests\Backend\
CMS
Pages
;
namespace
App\Http\Requests\Backend\Pages
;
use
App\Http\Requests\Request
;
/**
* Class
ManageCMSPages
Request.
* Class
DeletePage
Request.
*/
class
ManageCMSPages
Request
extends
Request
class
DeletePage
Request
extends
Request
{
/**
* Determine if the user is authorized to make this request.
...
...
@@ -16,7 +16,7 @@ class ManageCMSPagesRequest extends Request
*/
public
function
authorize
()
{
return
access
()
->
allow
(
'
view-cms-pages
'
);
return
access
()
->
allow
(
'
delete-page
'
);
}
/**
...
...
app/Http/Requests/Backend/
CMSPages/DeleteCMSPages
Request.php
→
app/Http/Requests/Backend/
Pages/EditPage
Request.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Requests\Backend\
CMS
Pages
;
namespace
App\Http\Requests\Backend\Pages
;
use
App\Http\Requests\Request
;
/**
* Class
DeleteCMSPages
Request.
* Class
EditPage
Request.
*/
class
DeleteCMSPages
Request
extends
Request
class
EditPage
Request
extends
Request
{
/**
* Determine if the user is authorized to make this request.
...
...
@@ -16,7 +16,7 @@ class DeleteCMSPagesRequest extends Request
*/
public
function
authorize
()
{
return
access
()
->
allow
(
'
delete-cms-pages
'
);
return
access
()
->
allow
(
'
edit-page
'
);
}
/**
...
...
app/Http/Requests/Backend/
CMSPages/CreateCMSPages
Request.php
→
app/Http/Requests/Backend/
Pages/ManagePage
Request.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Requests\Backend\
CMS
Pages
;
namespace
App\Http\Requests\Backend\Pages
;
use
App\Http\Requests\Request
;
/**
* Class
CreateCMSPages
Request.
* Class
ManagePage
Request.
*/
class
CreateCMSPages
Request
extends
Request
class
ManagePage
Request
extends
Request
{
/**
* Determine if the user is authorized to make this request.
...
...
@@ -16,7 +16,7 @@ class CreateCMSPagesRequest extends Request
*/
public
function
authorize
()
{
return
access
()
->
allow
(
'
create-cms-pages
'
);
return
access
()
->
allow
(
'
view-page
'
);
}
/**
...
...
app/Http/Requests/Backend/
CMSPages/StoreCMSPages
Request.php
→
app/Http/Requests/Backend/
Pages/StorePage
Request.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Requests\Backend\
CMS
Pages
;
namespace
App\Http\Requests\Backend\Pages
;
use
App\Http\Requests\Request
;
/**
* Class Store
CMSPages
Request.
* Class Store
Page
Request.
*/
class
Store
CMSPages
Request
extends
Request
class
Store
Page
Request
extends
Request
{
/**
* Determine if the user is authorized to make this request.
...
...
@@ -16,7 +16,7 @@ class StoreCMSPagesRequest extends Request
*/
public
function
authorize
()
{
return
access
()
->
allow
(
'create-
cms-pages
'
);
return
access
()
->
allow
(
'create-
page
'
);
}
/**
...
...
app/Http/Requests/Backend/
CMSPages/UpdateCMSPages
Request.php
→
app/Http/Requests/Backend/
Pages/UpdatePage
Request.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Http\Requests\Backend\
CMS
Pages
;
namespace
App\Http\Requests\Backend\Pages
;
use
App\Http\Requests\Request
;
/**
* Class Update
CMSPages
Request.
* Class Update
Page
Request.
*/
class
Update
CMSPages
Request
extends
Request
class
Update
Page
Request
extends
Request
{
/**
* Determine if the user is authorized to make this request.
...
...
@@ -16,7 +16,7 @@ class UpdateCMSPagesRequest extends Request
*/
public
function
authorize
()
{
return
access
()
->
allow
(
'edit-
cms-pages
'
);
return
access
()
->
allow
(
'edit-
page
'
);
}
/**
...
...
app/Models/
CMSPages/CMS
Page.php
→
app/Models/
Page/
Page.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Models\
CMSPages
;
namespace
App\Models\
Page
;
use
App\Models\CMSPages\Traits\Attribute\CMSPageAttribute
;
use
App\Models\ModelTrait
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
App\Models\Page\Traits\Attribute\PageAttribute
;
class
CMS
Page
extends
Model
class
Page
extends
Model
{
use
ModelTrait
,
SoftDeletes
,
CMS
PageAttribute
{
//
CMS
PageAttribute::getEditButtonAttribute insteadof ModelTrait;
PageAttribute
{
// PageAttribute::getEditButtonAttribute insteadof ModelTrait;
}
/**
...
...
app/Models/
CMSPages/Traits/Attribute/CMS
PageAttribute.php
→
app/Models/
Page/Traits/Attribute/
PageAttribute.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Models\
CMSPages
\Traits\Attribute
;
namespace
App\Models\
Page
\Traits\Attribute
;
/**
* Class
CMS
PageAttribute.
* Class PageAttribute.
*/
trait
CMS
PageAttribute
trait
PageAttribute
{
/**
* @return string
...
...
@@ -13,8 +13,8 @@ trait CMSPageAttribute
public
function
getActionButtonsAttribute
()
{
return
'<div class="btn-group action-btn">
'
.
$this
->
getEditButtonAttribute
(
'edit-cms-pages'
,
'admin.
cms
pages.edit'
)
.
'
'
.
$this
->
getDeleteButtonAttribute
(
'delete-cms-pages'
,
'admin.
cms
pages.destroy'
)
.
'
'
.
$this
->
getEditButtonAttribute
(
'edit-cms-pages'
,
'admin.pages.edit'
)
.
'
'
.
$this
->
getDeleteButtonAttribute
(
'delete-cms-pages'
,
'admin.pages.destroy'
)
.
'
</div>'
;
}
}
app/Repositories/Backend/
CMSPages/CMS
PagesRepository.php
→
app/Repositories/Backend/
Pages/
PagesRepository.php
100755 → 100644
View file @
bb0b8d37
<?php
namespace
App\Repositories\Backend\
CMS
Pages
;
namespace
App\Repositories\Backend\Pages
;
use
App\Events\Backend\CMSPages\CMSPageCreated
;
use
App\Events\Backend\CMSPages\CMSPageDeleted
;
use
App\Events\Backend\CMSPages\CMSPageUpdated
;
use
App\Exceptions\GeneralException
;
use
App\Models\CMSPages\CMSPage
;
use
App\Repositories\BaseRepository
;
use
DB
;
use
App\Models\Page\Page
;
use
App\Repositories\BaseRepository
;
use
App\Exceptions\GeneralException
;
use
Illuminate\Database\Eloquent\Model
;
use
App\Events\Backend\Pages\PageCreated
;
use
App\Events\Backend\Pages\PageDeleted
;
use
App\Events\Backend\Pages\PageUpdated
;
/**
* Class
CMS
PagesRepository.
* Class PagesRepository.
*/
class
CMS
PagesRepository
extends
BaseRepository
class
PagesRepository
extends
BaseRepository
{
/**
* Associated Repository Model.
*/
const
MODEL
=
CMS
Page
::
class
;
const
MODEL
=
Page
::
class
;
/**
* @return mixed
...
...
@@ -28,11 +28,11 @@ class CMSPagesRepository extends BaseRepository
{
return
$this
->
query
()
->
select
([
config
(
'access.
cms_
pages_table'
)
.
'.id'
,
config
(
'access.
cms_
pages_table'
)
.
'.title'
,
config
(
'access.
cms_
pages_table'
)
.
'.status'
,
config
(
'access.
cms_
pages_table'
)
.
'.created_at'
,
config
(
'access.
cms_
pages_table'
)
.
'.updated_at'
,
config
(
'access.pages_table'
)
.
'.id'
,
config
(
'access.pages_table'
)
.
'.title'
,
config
(
'access.pages_table'
)
.
'.status'
,
config
(
'access.pages_table'
)
.
'.created_at'
,
config
(
'access.pages_table'
)
.
'.updated_at'
,
]);
}
...
...
@@ -46,29 +46,29 @@ class CMSPagesRepository extends BaseRepository
public
function
create
(
array
$input
)
{
if
(
$this
->
query
()
->
where
(
'title'
,
$input
[
'title'
])
->
first
())
{
throw
new
GeneralException
(
trans
(
'exceptions.backend.
cms
pages.already_exists'
));
throw
new
GeneralException
(
trans
(
'exceptions.backend.pages.already_exists'
));
}
DB
::
transaction
(
function
()
use
(
$input
)
{
$
cms
pages
=
self
::
MODEL
;
$
cmspages
=
new
$cms
pages
();
$
cms
pages
->
title
=
$input
[
'title'
];
$
cms
pages
->
page_slug
=
str_slug
(
$input
[
'title'
]);
$
cms
pages
->
description
=
$input
[
'description'
];
$
cms
pages
->
cannonical_link
=
$input
[
'cannonical_link'
];
$
cms
pages
->
seo_title
=
$input
[
'seo_title'
];
$
cms
pages
->
seo_keyword
=
$input
[
'seo_keyword'
];
$
cms
pages
->
seo_description
=
$input
[
'seo_description'
];
$
cms
pages
->
status
=
(
isset
(
$input
[
'status'
])
&&
$input
[
'status'
]
==
1
)
?
1
:
0
;
$
cms
pages
->
created_by
=
access
()
->
user
()
->
id
;
if
(
$
cms
pages
->
save
())
{
event
(
new
CMSPageCreated
(
$cms
pages
));
$pages
=
self
::
MODEL
;
$
pages
=
new
$
pages
();
$pages
->
title
=
$input
[
'title'
];
$pages
->
page_slug
=
str_slug
(
$input
[
'title'
]);
$pages
->
description
=
$input
[
'description'
];
$pages
->
cannonical_link
=
$input
[
'cannonical_link'
];
$pages
->
seo_title
=
$input
[
'seo_title'
];
$pages
->
seo_keyword
=
$input
[
'seo_keyword'
];
$pages
->
seo_description
=
$input
[
'seo_description'
];
$pages
->
status
=
(
isset
(
$input
[
'status'
])
&&
$input
[
'status'
]
==
1
)
?
1
:
0
;
$pages
->
created_by
=
access
()
->
user
()
->
id
;
if
(
$pages
->
save
())
{
event
(
new
PageCreated
(
$
pages
));
return
true
;
}
throw
new
GeneralException
(
trans
(
'exceptions.backend.
cms
pages.create_error'
));
throw
new
GeneralException
(
trans
(
'exceptions.backend.pages.create_error'
));
});
}
...
...
@@ -80,49 +80,49 @@ class CMSPagesRepository extends BaseRepository
*
* return bool
*/
public
function
update
(
Model
$
cmspages
,
array
$input
)
public
function
update
(
Model
$
page
,
array
$input
)
{
if
(
$this
->
query
()
->
where
(
'title'
,
$input
[
'title'
])
->
where
(
'id'
,
'!='
,
$
cmspages
->
id
)
->
first
())
{
throw
new
GeneralException
(
trans
(
'exceptions.backend.
cms
pages.already_exists'
));
if
(
$this
->
query
()
->
where
(
'title'
,
$input
[
'title'
])
->
where
(
'id'
,
'!='
,
$
page
->
id
)
->
first
())
{
throw
new
GeneralException
(
trans
(
'exceptions.backend.pages.already_exists'
));
}
$
cmspages
->
title
=
$input
[
'title'
];
$
cmspages
->
page_slug
=
str_slug
(
$input
[
'title'
]);
$
cmspages
->
description
=
$input
[
'description'
];
$
cmspages
->
cannonical_link
=
$input
[
'cannonical_link'
];
$
cmspages
->
seo_title
=
$input
[
'seo_title'
];
$
cmspages
->
seo_keyword
=
$input
[
'seo_keyword'
];
$
cmspages
->
seo_description
=
$input
[
'seo_description'
];
$
cmspages
->
status
=
(
isset
(
$input
[
'status'
])
&&
$input
[
'status'
]
==
1
)
?
1
:
0
;
$
cmspages
->
updated_by
=
access
()
->
user
()
->
id
;
DB
::
transaction
(
function
()
use
(
$
cmspages
,
$input
)
{
if
(
$
cmspages
->
save
())
{
event
(
new
CMSPageUpdated
(
$cmspages
));
$
page
->
title
=
$input
[
'title'
];
$
page
->
page_slug
=
str_slug
(
$input
[
'title'
]);
$
page
->
description
=
$input
[
'description'
];
$
page
->
cannonical_link
=
$input
[
'cannonical_link'
];
$
page
->
seo_title
=
$input
[
'seo_title'
];
$
page
->
seo_keyword
=
$input
[
'seo_keyword'
];
$
page
->
seo_description
=
$input
[
'seo_description'
];
$
page
->
status
=
(
isset
(
$input
[
'status'
])
&&
$input
[
'status'
]
==
1
)
?
1
:
0
;
$
page
->
updated_by
=
access
()
->
user
()
->
id
;
DB
::
transaction
(
function
()
use
(
$
page
,
$input
)
{
if
(
$
page
->
save
())
{
event
(
new
PageUpdated
(
$page
));
return
true
;
}
throw
new
GeneralException
(
trans
(
'exceptions.backend.
cms
pages.update_error'
));
throw
new
GeneralException
(
trans
(
'exceptions.backend.pages.update_error'
));
});
}
/**
* @param Model $
cms
page
* @param Model $page
*
* @throws GeneralException
*
* @return bool
*/
public
function
delete
(
Model
$
cms
page
)
public
function
delete
(
Model
$page
)
{
DB
::
transaction
(
function
()
use
(
$
cms
page
)
{
if
(
$
cms
page
->
delete
())
{
event
(
new
CMSPageDeleted
(
$cms
page
));
DB
::
transaction
(
function
()
use
(
$page
)
{
if
(
$page
->
delete
())
{
event
(
new
PageDeleted
(
$
page
));
return
true
;
}
throw
new
GeneralException
(
trans
(
'exceptions.backend.
cms
pages.delete_error'
));
throw
new
GeneralException
(
trans
(
'exceptions.backend.pages.delete_error'
));
});
}
}
config/access.php
View file @
bb0b8d37
...
...
@@ -63,7 +63,7 @@ return [
/*
* cmspages table used to store cmspages
*/
'
cms_pages_table'
=>
'cms_
pages'
,
'
pages_table'
=>
'
pages'
,
/*
* email template placeholders table used to store email template placeholders
...
...
database/migrations/2017_11_02_060149_create_
cms_
pages_table.php
→
database/migrations/2017_11_02_060149_create_pages_table.php
View file @
bb0b8d37
...
...
@@ -3,7 +3,7 @@
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
class
Create
Cms
PagesTable
extends
Migration
class
CreatePagesTable
extends
Migration
{
/**
* Run the migrations.
...
...
@@ -12,7 +12,7 @@ class CreateCmsPagesTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'
cms_
pages'
,
function
(
Blueprint
$table
)
{
Schema
::
create
(
'pages'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'title'
,
191
);
$table
->
string
(
'page_slug'
,
191
)
->
unique
();
...
...
@@ -36,6 +36,6 @@ class CreateCmsPagesTable extends Migration
*/
public
function
down
()
{
Schema
::
drop
(
'
cms_
pages'
);
Schema
::
drop
(
'pages'
);
}
}
database/seeds/Access/PermissionTableSeeder.php
View file @
bb0b8d37
...
...
@@ -319,12 +319,12 @@ class PermissionTableSeeder extends Seeder
$viewBackend
->
save
();
/**
*
CMS
Pages.
* Pages.
*/
$permission_model
=
config
(
'access.permission'
);
$viewBackend
=
new
$permission_model
();
$viewBackend
->
name
=
'view-
cms-pages
'
;
$viewBackend
->
display_name
=
'View
CMS Pages
'
;
$viewBackend
->
name
=
'view-
page
'
;
$viewBackend
->
display_name
=
'View
Page
'
;
$viewBackend
->
sort
=
23
;
$viewBackend
->
created_by
=
1
;
$viewBackend
->
updated_by
=
null
;
...
...
@@ -335,8 +335,8 @@ class PermissionTableSeeder extends Seeder
$permission_model
=
config
(
'access.permission'
);
$viewBackend
=
new
$permission_model
();
$viewBackend
->
name
=
'create-
cms-pages
'
;
$viewBackend
->
display_name
=
'Create
CMS Pages
'
;
$viewBackend
->
name
=
'create-
page
'
;
$viewBackend
->
display_name
=
'Create
Page
'
;
$viewBackend
->
sort
=
24
;
$viewBackend
->
created_by
=
1
;
$viewBackend
->
updated_by
=
null
;
...
...
@@ -347,8 +347,8 @@ class PermissionTableSeeder extends Seeder
$permission_model
=
config
(
'access.permission'
);
$viewBackend
=
new
$permission_model
();
$viewBackend
->
name
=
'edit-
cms-pages
'
;
$viewBackend
->
display_name
=
'Edit
CMS Pages
'
;
$viewBackend
->
name
=
'edit-
page
'
;
$viewBackend
->
display_name
=
'Edit
Page
'
;
$viewBackend
->
sort
=
25
;
$viewBackend
->
created_by
=
1
;
$viewBackend
->
updated_by
=
null
;
...
...
@@ -359,8 +359,8 @@ class PermissionTableSeeder extends Seeder
$permission_model
=
config
(
'access.permission'
);
$viewBackend
=
new
$permission_model
();
$viewBackend
->
name
=
'delete-
cms-pages
'
;
$viewBackend
->
display_name
=
'Delete
CMS Pages
'
;
$viewBackend
->
name
=
'delete-
page
'
;
$viewBackend
->
display_name
=
'Delete
Page
'
;
$viewBackend
->
sort
=
26
;
$viewBackend
->
created_by
=
1
;
$viewBackend
->
updated_by
=
null
;
...
...
database/seeds/DatabaseSeeder.php
View file @
bb0b8d37
...
...
@@ -25,7 +25,7 @@ class DatabaseSeeder extends Seeder
$this
->
call
(
SettingsTableSeeder
::
class
);
$this
->
call
(
CountryTableSeeder
::
class
);
$this
->
call
(
StateTableSeeder
::
class
);
$this
->
call
(
Cms
PagesTableSeeder
::
class
);
$this
->
call
(
PagesTableSeeder
::
class
);
Model
::
reguard
();
}
...
...
database/seeds/
Cms
PagesTableSeeder.php
→
database/seeds/PagesTableSeeder.php
100755 → 100644
View file @
bb0b8d37
<?php
use
Carbon\Carbon
as
Carbon
;
use
Database\DisableForeignKeys
;
use
Carbon\Carbon
;
use
Database\TruncateTable
;
use
Illuminate\Database\Seeder
;
use
Database\DisableForeignKeys
;
use
Illuminate\Support\Facades\DB
;
class
Cms
PagesTableSeeder
extends
Seeder
class
PagesTableSeeder
extends
Seeder
{
use
DisableForeignKeys
,
TruncateTable
;
...
...
@@ -18,9 +18,9 @@ class CmsPagesTableSeeder extends Seeder
public
function
run
()
{
$this
->
disableForeignKeys
();
$this
->
truncate
(
config
(
'access.
cms_
pages_table'
));
$this
->
truncate
(
config
(
'access.pages_table'
));
$
cms
page
=
[
$page
=
[
[
'title'
=>
'Terms and conditions'
,
'page_slug'
=>
'terms-and-conditions'
,
...
...
@@ -32,7 +32,7 @@ class CmsPagesTableSeeder extends Seeder
],
];
DB
::
table
(
config
(
'access.
cms_pages_table'
))
->
insert
(
$cms
page
);
DB
::
table
(
config
(
'access.
pages_table'
))
->
insert
(
$
page
);
$this
->
enableForeignKeys
();
}
...
...
public/access.log
0 → 100644
View file @
bb0b8d37
This diff is collapsed.
Click to expand it.
public/img/backend/blog_images/1509470025_1-Vpk_qBCr1cDRpLv8SNv3oQ.jpeg
0 → 100644
View file @
bb0b8d37
142 KB
public/js/backend/admin.js
View file @
bb0b8d37
...
...
@@ -2,10 +2,10 @@ var FinBuilders = {
/**
*
Cmspage
*
Pages
*
*/
Cmspage
:
Pages
:
{
init
:
function
()
{
...
...
public/mix-manifest.json
View file @
bb0b8d37
{
"/js/frontend.js"
:
"/js/frontend.
d3a9d9963b6da237bfe8
.js"
,
"/js/backend.js"
:
"/js/backend.
51a14fd841ccd198e500
.js"
,
"/js/frontend.js"
:
"/js/frontend.
6600a6eb362abae28819
.js"
,
"/js/backend.js"
:
"/js/backend.
d106d5f7e2110ee3cea7
.js"
,
"/mix.js"
:
"/mix.247ab120fe7680658924.js"
,
"/css/frontend.css"
:
"/css/frontend.
3af0a6cbd7d1d8d042f2a37e97008b7c
.css"
,
"/css/backend.css"
:
"/css/backend.
f8550f50504e5b8ef6055285205f223a
.css"
,
"/css/backend-custom.css"
:
"/css/backend-custom.
50f14193ab908e3cf471dea6cb6616ae
.css"
,
"/js/backend-custom.js"
:
"/js/backend-custom.
d305fff90b4defcf757b268abb9a683c
.js"
,
"/js/dataTable.js"
:
"/js/dataTable.
f968d300a6a0b871f138f114361259c8
.js"
"/css/frontend.css"
:
"/css/frontend.
90a13bfbf8d4ea6a30a8eb218e8d48b3
.css"
,
"/css/backend.css"
:
"/css/backend.
7b6d826816293ff35f4185341567f559
.css"
,
"/css/backend-custom.css"
:
"/css/backend-custom.
187b92dacd8c501e4a19407d700d279b
.css"
,
"/js/backend-custom.js"
:
"/js/backend-custom.
bf0db4a7e7235e1c318af2c5dca556bd
.js"
,
"/js/dataTable.js"
:
"/js/dataTable.
0db0f52a09a62d485aa1229ed981b1cf
.js"
}
\ No newline at end of file
resources/lang/en/alerts.php
View file @
bb0b8d37
...
...
@@ -37,10 +37,10 @@ return [
'updated_password'
=>
"The user's password was successfully updated."
,
],
'
cms
pages'
=>
[
'created'
=>
'The
CMS
Page was successfully created.'
,
'deleted'
=>
'The
CMS
Page was successfully deleted.'
,
'updated'
=>
'The
CMS
Page was successfully updated.'
,
'pages'
=>
[
'created'
=>
'The Page was successfully created.'
,
'deleted'
=>
'The Page was successfully deleted.'
,
'updated'
=>
'The Page was successfully updated.'
,
],
'blogcategories'
=>
[
...
...
resources/lang/en/exceptions.php
View file @
bb0b8d37
...
...
@@ -56,12 +56,12 @@ return [
'update_password_error'
=>
'There was a problem changing this users password. Please try again.'
,
],
],
'
cms
pages'
=>
[
'already_exists'
=>
'That
CMS
Page already exists. Please choose a different name.'
,
'create_error'
=>
'There was a problem creating this
CMS
Page. Please try again.'
,
'delete_error'
=>
'There was a problem deleting this
CMS
Page. Please try again.'
,
'not_found'
=>
'That
CMS
Page does not exist.'
,
'update_error'
=>
'There was a problem updating this
CMS
Page. Please try again.'
,
'pages'
=>
[
'already_exists'
=>
'That Page already exists. Please choose a different name.'
,
'create_error'
=>
'There was a problem creating this Page. Please try again.'
,
'delete_error'
=>
'There was a problem deleting this Page. Please try again.'
,
'not_found'
=>
'That Page does not exist.'
,
'update_error'
=>
'There was a problem updating this Page. Please try again.'
,
],
'blogcategories'
=>
[
...
...
resources/lang/en/history.php
View file @
bb0b8d37
...
...
@@ -28,7 +28,7 @@ return [
'deleted'
=>
'deleted permission'
,
'updated'
=>
'updated permission'
,
],
'
cms
pages'
=>
[
'pages'
=>
[
'created'
=>
'created CMS Page'
,
'deleted'
=>
'deleted CMS Page'
,
'updated'
=>
'updated CMS Page'
,
...
...
resources/lang/en/labels.php
View file @
bb0b8d37
...
...
@@ -115,11 +115,11 @@ return [
],
],
'
cms
pages'
=>
[
'create'
=>
'Create
CMS
Page'
,
'edit'
=>
'Edit
CMS
Page'
,
'management'
=>
'
CMS
Page Management'
,
'title'
=>
'
CMS
Pages'
,
'pages'
=>
[
'create'
=>
'Create Page'
,
'edit'
=>
'Edit Page'
,
'management'
=>
'Page Management'
,
'title'
=>
'Pages'
,
'table'
=>
[
'title'
=>
'Title'
,
...
...
resources/lang/en/menus.php
View file @
bb0b8d37
...
...
@@ -57,12 +57,12 @@ return [
'system'
=>
'System'
,
],
'
cms
pages'
=>
[
'all'
=>
'All
CMS Page
'
,
'create'
=>
'Create
CMS
Page'
,
'edit'
=>
'Edit
CMS
Page'
,
'management'
=>
'
CMS
Page Management'
,
'main'
=>
'
CMS
Pages'
,
'pages'
=>
[
'all'
=>
'All
Pages
'
,
'create'
=>
'Create Page'
,
'edit'
=>
'Edit Page'
,
'management'
=>
'Page Management'
,
'main'
=>
'Pages'
,
],
'blogs'
=>
[
...
...
resources/lang/en/validation.php
View file @
bb0b8d37
...
...
@@ -155,7 +155,7 @@ return [
'send_confirmation_email'
=>
'Send Confirmation E-mail'
,
],
],
'
cms
pages'
=>
[
'pages'
=>
[
'title'
=>
'Title'
,
'description'
=>
'Description'
,
'cannonical_link'
=>
'Cannonical Link'
,
...
...
resources/views/backend/includes/partials/
cms
pages-header-buttons.blade.php
→
resources/views/backend/includes/partials/pages-header-buttons.blade.php
100755 → 100644
View file @
bb0b8d37
<!--Action Button-->
@if(Active::checkUriPattern('admin/
cms
pages'))
@if(Active::checkUriPattern('admin/pages'))
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-warning btn-flat dropdown-toggle"
data-toggle=
"dropdown"
>
Export
<span
class=
"caret"
></span>
...
...
@@ -21,9 +21,9 @@
<span
class=
"sr-only"
>
Toggle Dropdown
</span>
</button>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li><a
href=
"{{route('admin.
cmspages.index')}}"
><i
class=
"fa fa-list-ul"
></i>
{{trans('menus.backend.cms
pages.all')}}
</a></li>
@permission('create-
cms-pages
')
<li><a
href=
"{{route('admin.
cmspages.create')}}"
><i
class=
"fa fa-plus"
></i>
{{trans('menus.backend.cms
pages.create')}}
</a></li>
<li><a
href=
"{{route('admin.
pages.index')}}"
><i
class=
"fa fa-list-ul"
></i>
{{trans('menus.backend.
pages.all')}}
</a></li>
@permission('create-
page
')
<li><a
href=
"{{route('admin.
pages.create')}}"
><i
class=
"fa fa-plus"
></i>
{{trans('menus.backend.
pages.create')}}
</a></li>
@endauth
</ul>
</div>
...
...
resources/views/backend/includes/sidebar.blade.php
View file @
bb0b8d37
...
...
@@ -50,11 +50,11 @@
</ul>
</li>
@endauth
@permission('view-
cms-pages
')
<li
class=
"{{ active_class(Active::checkUriPattern('admin/
cms
pages*')) }}"
>
<a
href=
"{{ route('admin.
cms
pages.index') }}"
>
@permission('view-
page
')
<li
class=
"{{ active_class(Active::checkUriPattern('admin/pages*')) }}"
>
<a
href=
"{{ route('admin.pages.index') }}"
>
<i
class=
"fa fa-file-text"
></i>
<span>
{{ trans('labels.backend.
cms
pages.title') }}
</span>
<span>
{{ trans('labels.backend.pages.title') }}
</span>
</a>
</li>
@endauth
...
...
resources/views/backend/
cms
pages/create.blade.php
→
resources/views/backend/pages/create.blade.php
100755 → 100644
View file @
bb0b8d37
@
extends
(
'backend.layouts.app'
)
@
section
(
'title'
,
trans
(
'labels.backend.
cmspages.management'
)
.
' | '
.
trans
(
'labels.backend.cms
pages.create'
))
@
section
(
'title'
,
trans
(
'labels.backend.
pages.management'
)
.
' | '
.
trans
(
'labels.backend.
pages.create'
))
@
section
(
'page-header'
)
<
h1
>
{{
trans
(
'labels.backend.
cms
pages.management'
)
}}
<
small
>
{{
trans
(
'labels.backend.
cms
pages.create'
)
}}
</
small
>
{{
trans
(
'labels.backend.pages.management'
)
}}
<
small
>
{{
trans
(
'labels.backend.pages.create'
)
}}
</
small
>
</
h1
>
@
endsection
@
section
(
'content'
)
{{
Form
::
open
([
'route'
=>
'admin.
cms
pages.store'
,
'class'
=>
'form-horizontal'
,
'role'
=>
'form'
,
'method'
=>
'post'
,
'id'
=>
'create-permission'
])
}}
{{
Form
::
open
([
'route'
=>
'admin.pages.store'
,
'class'
=>
'form-horizontal'
,
'role'
=>
'form'
,
'method'
=>
'post'
,
'id'
=>
'create-permission'
])
}}
<
div
class
="
box
box
-
success
">
<div class="
box
-
header
with
-
border
">
<h3 class="
box
-
title
">{{ trans('labels.backend.
cms
pages.create') }}</h3>
<h3 class="
box
-
title
">{{ trans('labels.backend.pages.create') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.includes.partials.
cms
pages-header-buttons')
@include('backend.includes.partials.pages-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
<div class="
box
-
body
">
<div class="
form
-
group
">
{{ Form::label('title', trans('validation.attributes.backend.
cms
pages.title'), ['class' => 'col-lg-2 control-label required']) }}
{{ Form::label('title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.title'), 'required' => 'required']) }}
{{ Form::text('title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'), 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('description', trans('validation.attributes.backend.
cms
pages.description'), ['class' => 'col-lg-2 control-label required']) }}
{{ Form::label('description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label required']) }}
<div class="
col
-
lg
-
10
">
{{ Form::textarea('description', null,['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.description')]) }}
{{ Form::textarea('description', null,['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.description')]) }}
</div><!--col-lg-3-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('cannonical_link', trans('validation.attributes.backend.
cms
pages.cannonical_link'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('cannonical_link', trans('validation.attributes.backend.pages.cannonical_link'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('cannonical_link', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.cannonical_link')]) }}
{{ Form::text('cannonical_link', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.cannonical_link')]) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('seo_title', trans('validation.attributes.backend.
cms
pages.seo_title'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('seo_title', trans('validation.attributes.backend.pages.seo_title'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('seo_title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.seo_title')]) }}
{{ Form::text('seo_title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_title')]) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('seo_keyword', trans('validation.attributes.backend.
cms
pages.seo_keyword'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('seo_keyword', trans('validation.attributes.backend.pages.seo_keyword'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('seo_keyword', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.seo_keyword')]) }}
{{ Form::text('seo_keyword', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_keyword')]) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('seo_description', trans('validation.attributes.backend.
cms
pages.seo_description'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('seo_description', trans('validation.attributes.backend.pages.seo_description'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::textarea('seo_description', null,['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.seo_description')]) }}
{{ Form::textarea('seo_description', null,['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_description')]) }}
</div><!--col-lg-3-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('status', trans('validation.attributes.backend.
cms
pages.is_active'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('status', trans('validation.attributes.backend.pages.is_active'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
<div class="
control
-
group
">
...
...
@@ -83,7 +83,7 @@
</div><!--col-lg-3-->
</div><!--form control-->
<div class="
edit
-
form
-
btn
">
{{ link_to_route('admin.
cms
pages.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ link_to_route('admin.pages.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.create'), ['class' => 'btn btn-primary btn-md']) }}
<div class="
clearfix
"></div>
</div>
...
...
@@ -93,6 +93,6 @@
@endsection
@section("
after
-
scripts
")
<script type="
text
/
javascript
">
FinBuilders.
Cmspage
.init();
FinBuilders.
Pages
.init();
</script>
@endsection
resources/views/backend/
cms
pages/edit.blade.php
→
resources/views/backend/pages/edit.blade.php
100755 → 100644
View file @
bb0b8d37
@
extends
(
'backend.layouts.app'
)
@
section
(
'title'
,
trans
(
'labels.backend.
cmspages.management'
)
.
' | '
.
trans
(
'labels.backend.cms
pages.edit'
))
@
section
(
'title'
,
trans
(
'labels.backend.
pages.management'
)
.
' | '
.
trans
(
'labels.backend.
pages.edit'
))
@
section
(
'page-header'
)
<
h1
>
{{
trans
(
'labels.backend.
cms
pages.management'
)
}}
<
small
>
{{
trans
(
'labels.backend.
cms
pages.edit'
)
}}
</
small
>
{{
trans
(
'labels.backend.pages.management'
)
}}
<
small
>
{{
trans
(
'labels.backend.pages.edit'
)
}}
</
small
>
</
h1
>
@
endsection
@
section
(
'content'
)
{{
Form
::
model
(
$cmspage
,
[
'route'
=>
[
'admin.
cms
pages.update'
,
$cmspage
],
'class'
=>
'form-horizontal'
,
'role'
=>
'form'
,
'method'
=>
'PATCH'
,
'id'
=>
'edit-role'
])
}}
{{
Form
::
model
(
$cmspage
,
[
'route'
=>
[
'admin.pages.update'
,
$cmspage
],
'class'
=>
'form-horizontal'
,
'role'
=>
'form'
,
'method'
=>
'PATCH'
,
'id'
=>
'edit-role'
])
}}
<
div
class
="
box
box
-
success
">
<div class="
box
-
header
with
-
border
">
<h3 class="
box
-
title
">{{ trans('labels.backend.
cms
pages.edit') }}</h3>
<h3 class="
box
-
title
">{{ trans('labels.backend.pages.edit') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.includes.partials.
cms
pages-header-buttons')
@include('backend.includes.partials.pages-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
<div class="
box
-
body
">
<div class="
form
-
group
">
{{ Form::label('title', trans('validation.attributes.backend.
cms
pages.title'), ['class' => 'col-lg-2 control-label required']) }}
{{ Form::label('title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.title'), 'required' => 'required']) }}
{{ Form::text('title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'), 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('description', trans('validation.attributes.backend.
cms
pages.description'), ['class' => 'col-lg-2 control-label required']) }}
{{ Form::label('description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label required']) }}
<div class="
col
-
lg
-
10
">
{{ Form::textarea('description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.
cms
pages.description')]) }}
{{ Form::textarea('description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.pages.description')]) }}
</div><!--col-lg-3-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('cannonical_link', trans('validation.attributes.backend.
cms
pages.cannonical_link'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('cannonical_link', trans('validation.attributes.backend.pages.cannonical_link'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('cannonical_link', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.cannonical_link')]) }}
{{ Form::text('cannonical_link', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.cannonical_link')]) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('seo_title', trans('validation.attributes.backend.
cms
pages.seo_title'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('seo_title', trans('validation.attributes.backend.pages.seo_title'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('seo_title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.seo_title')]) }}
{{ Form::text('seo_title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_title')]) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('seo_keyword', trans('validation.attributes.backend.
cms
pages.seo_keyword'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('seo_keyword', trans('validation.attributes.backend.pages.seo_keyword'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::text('seo_keyword', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.
cms
pages.seo_keyword')]) }}
{{ Form::text('seo_keyword', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_keyword')]) }}
</div><!--col-lg-10-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('seo_description', trans('validation.attributes.backend.
cms
pages.seo_description'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('seo_description', trans('validation.attributes.backend.pages.seo_description'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
{{ Form::textarea('seo_description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.
cms
pages.seo_description')]) }}
{{ Form::textarea('seo_description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.pages.seo_description')]) }}
</div><!--col-lg-3-->
</div><!--form control-->
<div class="
form
-
group
">
{{ Form::label('status', trans('validation.attributes.backend.
cms
pages.is_active'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::label('status', trans('validation.attributes.backend.pages.is_active'), ['class' => 'col-lg-2 control-label']) }}
<div class="
col
-
lg
-
10
">
<div class="
control
-
group
">
...
...
@@ -83,7 +83,7 @@
</div><!--col-lg-3-->
</div><!--form control-->
<div class="
edit
-
form
-
btn
">
{{ link_to_route('admin.
cms
pages.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ link_to_route('admin.pages.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.update'), ['class' => 'btn btn-primary btn-md']) }}
<div class="
clearfix
"></div>
</div>
...
...
resources/views/backend/
cms
pages/index.blade.php
→
resources/views/backend/pages/index.blade.php
100755 → 100644
View file @
bb0b8d37
@
extends
(
'backend.layouts.app'
)
@
section
(
'title'
,
trans
(
'labels.backend.
cms
pages.management'
))
@
section
(
'title'
,
trans
(
'labels.backend.pages.management'
))
@
section
(
'page-header'
)
<
h1
>
{{
trans
(
'labels.backend.
cms
pages.management'
)
}}
</
h1
>
<
h1
>
{{
trans
(
'labels.backend.pages.management'
)
}}
</
h1
>
@
endsection
@
section
(
'content'
)
<
div
class
="
box
box
-
success
">
<div class="
box
-
header
with
-
border
">
<h3 class="
box
-
title
">{{ trans('labels.backend.
cms
pages.management') }}</h3>
<h3 class="
box
-
title
">{{ trans('labels.backend.pages.management') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.includes.partials.
cms
pages-header-buttons')
@include('backend.includes.partials.pages-header-buttons')
</div>
</div><!-- /.box-header -->
<div class="
box
-
body
">
<div class="
table
-
responsive
data
-
table
-
wrapper
">
<table id="
cms
pages
-
table
" class="
table
table
-
condensed
table
-
hover
table
-
bordered
">
<table id="
pages
-
table
" class="
table
table
-
condensed
table
-
hover
table
-
bordered
">
<thead>
<tr>
<th>{{ trans('labels.backend.
cms
pages.table.title') }}</th>
<th>{{ trans('labels.backend.
cms
pages.table.status') }}</th>
<th>{{ trans('labels.backend.
cms
pages.table.createdat') }}</th>
<th>{{ trans('labels.backend.
cms
pages.table.updatedat') }}</th>
<th>{{ trans('labels.backend.pages.table.title') }}</th>
<th>{{ trans('labels.backend.pages.table.status') }}</th>
<th>{{ trans('labels.backend.pages.table.createdat') }}</th>
<th>{{ trans('labels.backend.pages.table.updatedat') }}</th>
<th>{{ trans('labels.general.actions') }}</th>
</tr>
</thead>
<thead class="
transparent
-
bg
">
<tr>
<th>
{!! Form::text('first_name', null, ["
class
"
=>
"
search
-
input
-
text
form
-
control
", "
data
-
column
" => 0, "
placeholder
" => trans('labels.backend.
cms
pages.table.title')]) !!}
{!! Form::text('first_name', null, ["
class
"
=>
"
search
-
input
-
text
form
-
control
", "
data
-
column
" => 0, "
placeholder
" => trans('labels.backend.pages.table.title')]) !!}
<a class="
reset
-
data
" href="
javascript
:
void
(
0
)
"><i class="
fa
fa
-
times
"></i></a>
</th>
<th>
{!! Form::select('status', [0 => "
InActive
", 1 => "
Active
"], null, ["
class
"
=>
"
search
-
input
-
select
form
-
control
", "
data
-
column
" => 1, "
placeholder
" => trans('labels.backend.
cms
pages.table.all')]) !!}
{!! Form::select('status', [0 => "
InActive
", 1 => "
Active
"], null, ["
class
"
=>
"
search
-
input
-
select
form
-
control
", "
data
-
column
" => 1, "
placeholder
" => trans('labels.backend.pages.table.all')]) !!}
</th>
<th></th>
<th></th>
...
...
@@ -66,18 +66,18 @@
<script>
$(function() {
var dataTable = $('#
cms
pages-table').dataTable({
var dataTable = $('#pages-table').dataTable({
processing: true,
serverSide: true,
ajax: {
url: '{{ route("
admin
.
cms
pages
.
get
") }}',
url: '{{ route("
admin
.
pages
.
get
") }}',
type: 'post'
},
columns: [
{data: 'title', name: '
{
{config('access.
cms_page
_table')}}.title'
}
,
{data: 'status', name: '
{
{config('access.
cms_page
_table')}}.status'
}
,
{data: 'created_at', name: '
{
{config('access.
cms_page
_table')}}.created_at'
}
,
{data: 'updated_at', name: '
{
{config('access.
cms_page
_table')}}.updated_at'
}
,
{data: 'title', name: '
{
{config('access.
pages
_table')}}.title'
}
,
{data: 'status', name: '
{
{config('access.
pages
_table')}}.status'
}
,
{data: 'created_at', name: '
{
{config('access.
pages
_table')}}.created_at'
}
,
{data: 'updated_at', name: '
{
{config('access.
pages
_table')}}.updated_at'
}
,
{data: 'actions', name: 'actions', searchable: false, sortable: false}
],
order: [[3, "
asc
"]],
...
...
routes/Backend/Dashboard.php
View file @
bb0b8d37
...
...
@@ -22,16 +22,6 @@ Route::any('generateSlug', function (\Illuminate\Http\Request $request) {
return
str_slug
(
$request
[
'text'
]);
})
->
name
(
'generate.slug'
);
/*
* CMS Pages Management
*/
Route
::
group
([
'namespace'
=>
'CMSPages'
],
function
()
{
Route
::
resource
(
'cmspages'
,
'CMSPagesController'
,
[
'except'
=>
[
'show'
]]);
//For DataTables
Route
::
post
(
'cmspages/get'
,
'CMSPagesTableController'
)
->
name
(
'cmspages.get'
);
});
/*
* Email Templates Management
*/
...
...
routes/Backend/Pages.php
0 → 100644
View file @
bb0b8d37
<?php
/*
* CMS Pages Management
*/
Route
::
group
([
'namespace'
=>
'Pages'
],
function
()
{
Route
::
resource
(
'pages'
,
'PagesController'
,
[
'except'
=>
[
'show'
]]);
//For DataTables
Route
::
post
(
'pages/get'
,
'PagesTableController'
)
->
name
(
'pages.get'
);
});
\ 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