Commit 56a1a44c authored by Viral Solani's avatar Viral Solani
parents ffae1c31 94d956e6
APP_NAME=Laravel APP_NAME="Laravel Admin Panel"
APP_ENV=local APP_ENV=local
APP_KEY=base64:O+TrollIDwasHEREtMG9kBc+/Q32exQLusNVhnq558w= APP_KEY=base64:O+TrollIDwasHEREtMG9kBc+/Q32exQLusNVhnq558w=
APP_DEBUG=true APP_DEBUG=true
......
...@@ -99,13 +99,13 @@ Password: `1234` ...@@ -99,13 +99,13 @@ Password: `1234`
## ScreenShots ## ScreenShots
## Dashboard ## Dashboard
![Screenshot](screenshots/dashboard_sc.png) ![Screenshot](screenshots/dashboard.png)
## User Listing ## User Listing
![Screenshot](screenshots/users_sc.png) ![Screenshot](screenshots/users.png)
## Settings ## Settings
![Screenshot](screenshots/settings_sc.png) ![Screenshot](screenshots/settings.png)
## Issues ## Issues
......
...@@ -15,4 +15,5 @@ require __DIR__.'/Blog_Category.php'; ...@@ -15,4 +15,5 @@ require __DIR__.'/Blog_Category.php';
require __DIR__.'/Blog_Tag.php'; require __DIR__.'/Blog_Tag.php';
require __DIR__.'/Blog_Management.php'; require __DIR__.'/Blog_Management.php';
require __DIR__.'/Faqs.php'; require __DIR__.'/Faqs.php';
require __DIR__.'/Menu.php';
require __DIR__.'/LogViewer.php'; require __DIR__.'/LogViewer.php';
<?php
Breadcrumbs::register('admin.menus.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.menus.management'), route('admin.menus.index'));
});
Breadcrumbs::register('admin.menus.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.menus.index');
$breadcrumbs->push(trans('menus.backend.menus.create'), route('admin.menus.create'));
});
Breadcrumbs::register('admin.menus.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.menus.index');
$breadcrumbs->push(trans('menus.backend.menus.edit'), route('admin.menus.edit', $id));
});
...@@ -22,7 +22,7 @@ class BlogsController extends Controller ...@@ -22,7 +22,7 @@ class BlogsController extends Controller
protected $status = [ protected $status = [
'Published' => 'Published', 'Published' => 'Published',
'Draft' => 'Draft', 'Draft' => 'Draft',
'Inactive' => 'Inactive', 'InActive' => 'InActive',
'Scheduled' => 'Scheduled', 'Scheduled' => 'Scheduled',
]; ];
......
...@@ -44,12 +44,6 @@ class DashboardController extends Controller ...@@ -44,12 +44,6 @@ class DashboardController extends Controller
$user = User::find($userId); $user = User::find($userId);
$user->first_name = $input['first_name']; $user->first_name = $input['first_name'];
$user->last_name = $input['last_name']; $user->last_name = $input['last_name'];
$user->address = $input['address'];
$user->state_id = $input['state_id'];
$user->country_id = config('access.constants.default_country');
$user->city_id = $input['city_id'];
$user->zip_code = $input['zip_code'];
$user->ssn = $input['ssn'];
$user->updated_by = access()->user()->id; $user->updated_by = access()->user()->id;
if ($user->save()) { if ($user->save()) {
......
...@@ -14,13 +14,10 @@ use Illuminate\Http\Request; ...@@ -14,13 +14,10 @@ use Illuminate\Http\Request;
*/ */
class SettingsController extends Controller class SettingsController extends Controller
{ {
/**
* @var SettingsRepository
*/
protected $settings; protected $settings;
/** /**
* @param SettingsRepository $settings * @param \App\Repositories\Backend\Settings\SettingsRepository $settings
*/ */
public function __construct(SettingsRepository $settings) public function __construct(SettingsRepository $settings)
{ {
...@@ -28,8 +25,8 @@ class SettingsController extends Controller ...@@ -28,8 +25,8 @@ class SettingsController extends Controller
} }
/** /**
* @param Setting $setting * @param \App\Models\Settings\Setting $setting
* @param ManageEmailTemplatesRequest $request * @param \App\Http\Requests\Backend\Settings\ManageSettingsRequest $request
* *
* @return mixed * @return mixed
*/ */
...@@ -40,16 +37,18 @@ class SettingsController extends Controller ...@@ -40,16 +37,18 @@ class SettingsController extends Controller
} }
/** /**
* @param Setting $setting * @param \App\Models\Settings\Setting $setting
* @param UpdateEmailTemplatesRequest $request * @param \App\Http\Requests\Backend\Settings\UpdateSettingsRequest $request
* *
* @return mixed * @return mixed
*/ */
public function update(Setting $setting, UpdateSettingsRequest $request) public function update(Setting $setting, UpdateSettingsRequest $request)
{ {
$this->settings->update($setting, $request->all()); $this->settings->update($setting, $request->except(['_token', '_method']));
return redirect()->route('admin.settings.edit', $setting->id)->withFlashSuccess(trans('alerts.backend.settings.updated')); return redirect()
->route('admin.settings.edit', $setting->id)
->with('flash_success', trans('alerts.backend.settings.updated'));
} }
/** /**
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace App\Http\Requests\Backend\Settings; namespace App\Http\Requests\Backend\Settings;
use App\Http\Requests\Request; use App\Http\Requests\Request;
use App\Models\Settings\Setting;
/** /**
* Class UpdateSettingsRequest. * Class UpdateSettingsRequest.
...@@ -27,25 +26,9 @@ class UpdateSettingsRequest extends Request ...@@ -27,25 +26,9 @@ class UpdateSettingsRequest extends Request
*/ */
public function rules() public function rules()
{ {
$data = Setting::find(1);
$checkLogo = $data->logo;
$checkFavicon = $data->favicon;
if (!empty($checkLogo)) {
$logoValidation = 'image|dimensions:min_width=226,min_height=48';
} else {
$logoValidation = 'required|image|dimensions:min_width=226,min_height=48';
}
if (!empty($checkFavicon)) {
$faviconValidation = 'mimes:jpg,jpeg,png,ico|dimensions:width=16,height=16';
} else {
$faviconValidation = 'required|mimes:jpg,jpeg,png,ico|dimensions:width=16,height=16';
}
return [ return [
'logo' => $logoValidation, 'logo' => 'image|dimensions:min_width=226,min_height=48',
'favicon' => $faviconValidation, 'favicon' => 'mimes:jpg,jpeg,png,ico|dimensions:width=16,height=16',
'from_name' => 'required',
'from_email' => 'required',
]; ];
} }
...@@ -58,11 +41,7 @@ class UpdateSettingsRequest extends Request ...@@ -58,11 +41,7 @@ class UpdateSettingsRequest extends Request
{ {
return [ return [
'logo.dimensions' => 'Invalid logo - should be minimum 226*48', 'logo.dimensions' => 'Invalid logo - should be minimum 226*48',
'favicon.dimensions' => 'Invalid icon - should be 16*16', 'favicon.dimensions' => 'Invalid favicon - should be 16*16',
'logo.required' => 'The logo field is required in seo settings.',
'favicon.required' => 'The favicon field is required in seo settings.',
'from_name.required' => 'The from name field is required in mail settings.',
'from_email.required' => 'The from email field is required in mail settings.',
]; ];
} }
} }
...@@ -372,6 +372,11 @@ trait UserAttribute ...@@ -372,6 +372,11 @@ trait UserAttribute
return $button; return $button;
} }
public function getNameAttribute()
{
return $this->first_name.' '.$this->last_name;
}
/** /**
* @return string * @return string
*/ */
......
...@@ -5,7 +5,6 @@ namespace App\Repositories\Backend\Settings; ...@@ -5,7 +5,6 @@ namespace App\Repositories\Backend\Settings;
use App\Exceptions\GeneralException; use App\Exceptions\GeneralException;
use App\Models\Settings\Setting; use App\Models\Settings\Setting;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use DB;
/** /**
* Class SettingsRepository. * Class SettingsRepository.
...@@ -18,19 +17,15 @@ class SettingsRepository extends BaseRepository ...@@ -18,19 +17,15 @@ class SettingsRepository extends BaseRepository
const MODEL = Setting::class; const MODEL = Setting::class;
/** /**
* @param Model $permission * @param \App\Models\Settings\Setting $setting
* @param $input * @param $input
* *
* @throws GeneralException * @throws \App\Exceptions\GeneralException
* *
* return bool * return bool
*/ */
public function update(Model $setting, array $input) public function update(Setting $setting, array $input)
{ {
// Unsetting method and token values from array
unset($input['_method']);
unset($input['_token']);
if (isset($input['logo'])) { if (isset($input['logo'])) {
$image_upload = $this->uploadlogoimage($setting, $input['logo']); $image_upload = $this->uploadlogoimage($setting, $input['logo']);
$input['logo'] = $image_upload; $input['logo'] = $image_upload;
...@@ -41,13 +36,11 @@ class SettingsRepository extends BaseRepository ...@@ -41,13 +36,11 @@ class SettingsRepository extends BaseRepository
$input['favicon'] = $image_upload; $input['favicon'] = $image_upload;
} }
DB::transaction(function () use ($setting, $input) { if ($setting->update($input)) {
if ($setting->update($input)) { return true;
return true; }
}
throw new GeneralException(trans('exceptions.backend.settings.update_error')); throw new GeneralException(trans('exceptions.backend.settings.update_error'));
});
} }
/* /*
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
}, },
"require-dev": { "require-dev": {
"barryvdh/laravel-debugbar": "^3.0", "barryvdh/laravel-debugbar": "^3.0",
"bvipul/generator": "v0.9.1", "bvipul/generator": "^0.9.1",
"filp/whoops": "~2.0", "filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*", "mockery/mockery": "0.9.*",
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
"autoload": { "autoload": {
"classmap": [ "classmap": [
"database/seeds", "database/seeds",
"database/factories" "database/factories",
"database"
], ],
"psr-4": { "psr-4": {
"App\\": "app/" "App\\": "app/"
...@@ -51,8 +52,7 @@ ...@@ -51,8 +52,7 @@
"Tests\\": "tests/" "Tests\\": "tests/"
}, },
"classmap": [ "classmap": [
"tests/TestCase.php", "tests/TestCase.php"
"tests/BrowserKitTestCase.php"
] ]
}, },
"scripts": { "scripts": {
......
This diff is collapsed.
...@@ -8,7 +8,7 @@ return [ ...@@ -8,7 +8,7 @@ return [
* *
* @var bool * @var bool
*/ */
'status' => true, 'status' => false,
/* /*
* Available languages * Available languages
...@@ -29,19 +29,19 @@ return [ ...@@ -29,19 +29,19 @@ return [
* Index 1 of sub-array is the PHP locale code for setlocale() * Index 1 of sub-array is the PHP locale code for setlocale()
* Index 2 of sub-array is whether or not to use RTL (right-to-left) css for this language * Index 2 of sub-array is whether or not to use RTL (right-to-left) css for this language
*/ */
'ar' => ['ar', 'ar_AR', true], // 'ar' => ['ar', 'ar_AR', true],
'da' => ['da', 'da_DK', false], // 'da' => ['da', 'da_DK', false],
'de' => ['de', 'de_DE', false], // 'de' => ['de', 'de_DE', false],
'el' => ['el', 'el_GR', false], // 'el' => ['el', 'el_GR', false],
'en' => ['en', 'en_US', false], 'en' => ['en', 'en_US', false],
'es' => ['es', 'es_ES', false], // 'es' => ['es', 'es_ES', false],
'fr' => ['fr', 'fr_FR', false], // 'fr' => ['fr', 'fr_FR', false],
'id' => ['id', 'id_ID', false], // 'id' => ['id', 'id_ID', false],
'it' => ['it', 'it_IT', false], // 'it' => ['it', 'it_IT', false],
'nl' => ['nl', 'nl_NL', false], // 'nl' => ['nl', 'nl_NL', false],
'pt_BR' => ['pt_BR', 'pt_BR', false], // 'pt_BR' => ['pt_BR', 'pt_BR', false],
'ru' => ['ru', 'ru-RU', false], // 'ru' => ['ru', 'ru-RU', false],
'sv' => ['sv', 'sv_SE', false], // 'sv' => ['sv', 'sv_SE', false],
'th' => ['th', 'th_TH', false], // 'th' => ['th', 'th_TH', false],
], ],
]; ];
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMenusTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menus', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->enum('type', ['backend', 'frontend']);
$table->string('name');
$table->text('items')->nullable();
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('menus');
}
}
...@@ -24,6 +24,8 @@ class DatabaseSeeder extends Seeder ...@@ -24,6 +24,8 @@ class DatabaseSeeder extends Seeder
$this->call(EmailTemplateTableSeeder::class); $this->call(EmailTemplateTableSeeder::class);
$this->call(SettingsTableSeeder::class); $this->call(SettingsTableSeeder::class);
$this->call(PagesTableSeeder::class); $this->call(PagesTableSeeder::class);
$this->call(MenuTableSeeder::class);
$this->call(ModulesTableSeeder::class);
Model::reguard(); Model::reguard();
} }
......
<?php
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class MenuTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table(config('access.menus_table'))->truncate();
$menu = [
'id' => 1,
'type' => 'backend',
'name' => 'Backend Sidebar Menu',
'items' => '[{"view_permission_id":"view-access-management","icon":"fa-users","open_in_new_tab":0,"url_type":"route","url":"","name":"Access Management","id":11,"content":"Access Management","children":[{"view_permission_id":"view-user-management","open_in_new_tab":0,"url_type":"route","url":"admin.access.user.index","name":"User Management","id":12,"content":"User Management"},{"view_permission_id":"view-role-management","open_in_new_tab":0,"url_type":"route","url":"admin.access.role.index","name":"Role Management","id":13,"content":"Role Management"},{"view_permission_id":"view-permission-management","open_in_new_tab":0,"url_type":"route","url":"admin.access.permission.index","name":"Permission Management","id":14,"content":"Permission Management"}]},{"view_permission_id":"view-module","icon":"fa-wrench","open_in_new_tab":0,"url_type":"route","url":"admin.modules.index","name":"Module","id":1,"content":"Module"},{"view_permission_id":"view-menu","icon":"fa-bars","open_in_new_tab":0,"url_type":"route","url":"admin.menus.index","name":"Menus","id":3,"content":"Menus"},{"view_permission_id":"view-page","icon":"fa-file-text","open_in_new_tab":0,"url_type":"route","url":"admin.pages.index","name":"Pages","id":2,"content":"Pages"},{"view_permission_id":"view-email-template","icon":"fa-envelope","open_in_new_tab":0,"url_type":"route","url":"admin.emailtemplates.index","name":"Email Templates","id":8,"content":"Email Templates"},{"view_permission_id":"edit-settings","icon":"fa-gear","open_in_new_tab":0,"url_type":"route","url":"admin.settings.edit?id=1","name":"Settings","id":9,"content":"Settings"},{"view_permission_id":"view-blog","icon":"fa-commenting","open_in_new_tab":0,"url_type":"route","url":"","name":"Blog Management","id":15,"content":"Blog Management","children":[{"view_permission_id":"view-blog-category","open_in_new_tab":0,"url_type":"route","url":"admin.blogcategories.index","name":"Blog Category Management","id":16,"content":"Blog Category Management"},{"view_permission_id":"view-blog-tag","open_in_new_tab":0,"url_type":"route","url":"admin.blogtags.index","name":"Blog Tag Management","id":17,"content":"Blog Tag Management"},{"view_permission_id":"view-blog","open_in_new_tab":0,"url_type":"route","url":"admin.blogs.index","name":"Blog Management","id":18,"content":"Blog Management"}]},{"view_permission_id":"view-faq","icon":"fa-question-circle","open_in_new_tab":0,"url_type":"route","url":"admin.faqs.index","name":"Faq Management","id":19,"content":"Faq Management"}]',
'created_by' => 1,
'created_at' => Carbon::now(),
];
DB::table(config('access.menus_table'))->insert($menu);
}
}
<?php
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ModulesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('modules')->truncate();
$modules = [
[
'name' => trans('menus.backend.access.title'),
'url' => null,
'view_permission_id' => 'view-access-management',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.access.users.management'),
'url' => 'admin.access.user.index',
'view_permission_id' => 'view-user-management',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.access.roles.management'),
'url' => 'admin.access.role.index',
'view_permission_id' => 'view-role-management',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.access.permissions.management'),
'url' => 'admin.access.permission.index',
'view_permission_id' => 'view-permission-management',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.menus.title'),
'url' => 'admin.menus.index',
'view_permission_id' => 'view-menu',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.modules.title'),
'url' => 'admin.modules.index',
'view_permission_id' => 'view-module',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.pages.title'),
'url' => 'admin.pages.index',
'view_permission_id' => 'view-page',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.emailtemplates.title'),
'url' => 'admin.emailtemplates.index',
'view_permission_id' => 'view-email-template',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('labels.backend.settings.title'),
'url' => 'admin.settings.edit',
'view_permission_id' => 'edit-settings',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('menus.backend.blog.management'),
'url' => null,
'view_permission_id' => 'view-blog',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('menus.backend.blogcategories.management'),
'url' => 'admin.blogcategories.index',
'view_permission_id' => 'view-blog-category',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('menus.backend.blogtags.management'),
'url' => 'admin.blogtags.index',
'view_permission_id' => 'view-blog-tag',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('menus.backend.blog.management'),
'url' => 'admin.blogs.index',
'view_permission_id' => 'view-blog',
'created_by' => 1,
'created_at' => Carbon::now(),
],
[
'name' => trans('menus.backend.faqs.management'),
'url' => 'admin.faqs.index',
'view_permission_id' => 'view-faq',
'created_by' => 1,
'created_at' => Carbon::now(),
],
];
DB::table('modules')->insert($modules);
}
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="bootstrap/autoload.php" colors="true" <phpunit backupGlobals="false"
convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" backupStaticAttributes="false"
processIsolation="false" stopOnFailure="false"> bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Feature Tests">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
<testsuite name="Unit Tests">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<filter> <filter>
<whitelist processUncoveredFilesFromWhitelist="true"> <whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php"> <directory suffix=".php">./app</directory>
./app
</directory>
</whitelist> </whitelist>
</filter> </filter>
<php> <php>
<env name="APP_ENV" value="testing"/> <env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/> <env name="DB_CONNECTION" value="sqlite"/>
<env name="ENABLE_REGISTRATION" value="true"/> <env name="DB_DATABASE" value=":memory:"/>
<env name="QUEUE_DRIVER" value="sync"/> <env name="CACHE_DRIVER" value="array"/>
<env name="REGISTRATION_CAPTCHA_STATUS" value="false"/>
<env name="SESSION_DRIVER" value="array"/> <env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
<env name="SCOUT_DRIVER" value="null"/>
</php> </php>
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">
./tests
</directory>
</testsuite>
</testsuites>
</phpunit> </phpunit>
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
--theme-co: #495867; --theme-co: #495867;
--light-blue: #BDD5EA; --light-blue: #BDD5EA;
} }
html, body {
height: 100%;
}
.box { .box {
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
...@@ -9,6 +12,9 @@ ...@@ -9,6 +12,9 @@
-ms-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); -ms-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
-o-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); -o-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
} }
.box.box-info {
border-top-color: var(--theme-co);
}
.box-header { .box-header {
padding: 15px 10px; padding: 15px 10px;
...@@ -219,13 +225,13 @@ textarea.form-control { max-width: 100%; min-height: 50px; } ...@@ -219,13 +225,13 @@ textarea.form-control { max-width: 100%; min-height: 50px; }
.control-group { display: block; text-align: left; padding: 0; margin: 3px 0 0; } .control-group { display: block; text-align: left; padding: 0; margin: 3px 0 0; }
.control { display: inline-block; vertical-align: top; position: relative; padding-left: 32px; padding-right: 10px; cursor: pointer; font-size: 14px; line-height: 28px; font-weight: 500; } .control { display: inline-block; vertical-align: top; position: relative; padding-left: 32px; padding-right: 10px; cursor: pointer; font-size: 14px; line-height: 28px; font-weight: 500; }
.control input { position: absolute; z-index: -1; opacity: 0; } .control input { position: absolute; z-index: -1; opacity: 0; }
.control__indicator { position: absolute; top: 3px; left: 0; height: 24px; width: 24px; } .control__indicator { position: absolute; top: 3px; left: 0; height: 24px; width: 24px; border: 1px solid var(--theme-co); }
.control--radio .control__indicator { border-radius: 50%; } .control--radio .control__indicator { border-radius: 50%; }
.control input:disabled ~ .control__indicator { opacity: 0.6; pointer-events: none; } .control input:disabled ~ .control__indicator { opacity: 0.6; pointer-events: none; }
.control__indicator:after { content: ''; position: absolute; display: none; } .control__indicator:after { content: ''; position: absolute; display: none; }
.control input:checked ~ .control__indicator:after { display: block; } .control input:checked ~ .control__indicator:after { display: block; }
.control--checkbox .control__indicator:after { left: 8px; top: 4px; width: 7px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); } .control--checkbox .control__indicator:after { left: 8px; top: 4px; width: 7px; height: 12px; border: solid var(--theme-co); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.control--radio .control__indicator:after { left: 7px; top: 7px; height: 10px; width: 10px; border-radius: 50%; background: #fff; } .control--radio .control__indicator:after { left: 6px; top: 6px; height: 10px; width: 10px; border-radius: 50%; background: var(--theme-co); }
/* selectbox css */ /* selectbox css */
::-moz-focus-inner, select:focus, select:active { outline: 0 !important; -moz-outline: 0 !important; } ::-moz-focus-inner, select:focus, select:active { outline: 0 !important; -moz-outline: 0 !important; }
.data-table-wrapper .dataTables_length label { position: relative; display: inline-block; width: 100%; } .data-table-wrapper .dataTables_length label { position: relative; display: inline-block; width: 100%; }
...@@ -322,6 +328,11 @@ ul.timeline.notification-list>li>.timeline-item { margin-right: 0; } ...@@ -322,6 +328,11 @@ ul.timeline.notification-list>li>.timeline-item { margin-right: 0; }
ul.timeline.notification-list>li>.timeline-item>.timeline-header { border-bottom: 0; font-size: 15px; } ul.timeline.notification-list>li>.timeline-item>.timeline-header { border-bottom: 0; font-size: 15px; }
ul.timeline.notification-list>li>.timeline-item>.timeline-header>span.comment-hl { padding-right: 3px; font-weight: 600; } ul.timeline.notification-list>li>.timeline-item>.timeline-header>span.comment-hl { padding-right: 3px; font-weight: 600; }
.pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover {
background-color: var(--theme-co);
border-color: var(--theme-co);
}
/* Tab CSS start */ /* Tab CSS start */
.setting-tab-list.nav-tabs>li>a { color: #555; } .setting-tab-list.nav-tabs>li>a { color: #555; }
.tab-content.setting-tab { padding-top: 30px; } .tab-content.setting-tab { padding-top: 30px; }
...@@ -346,4 +357,4 @@ ul.timeline.notification-list>li>.timeline-item>.timeline-header>span.comment-hl ...@@ -346,4 +357,4 @@ ul.timeline.notification-list>li>.timeline-item>.timeline-header>span.comment-hl
@media screen and (max-width: 992px){ @media screen and (max-width: 992px){
.navbar-custom-menu>.navbar-nav>li>.dropdown-menu { right: 3%; } .navbar-custom-menu>.navbar-nav>li>.dropdown-menu { right: 3%; }
} }
/*Responsive CSS end*/ /*Responsive CSS end*/
\ No newline at end of file
{ {
"/js/frontend.js": "/js/frontend.945469bbbc12df3ad9e1.js", "/js/frontend.js": "/js/frontend.70ee44a92d84e7318a9d.js",
"/js/backend.js": "/js/backend.79d9e4698dadbc0d93c7.js", "/js/backend.js": "/js/backend.9cdae6ab449e701ce881.js",
"/mix.js": "/mix.247ab120fe7680658924.js", "/mix.js": "/mix.247ab120fe7680658924.js",
"/css/frontend.css": "/css/frontend.3af0a6cbd7d1d8d042f2a37e97008b7c.css", "/css/frontend.css": "/css/frontend.3af0a6cbd7d1d8d042f2a37e97008b7c.css",
"/css/backend.css": "/css/backend.f8550f50504e5b8ef6055285205f223a.css", "/css/backend.css": "/css/backend.f8550f50504e5b8ef6055285205f223a.css",
"/css/backend-custom.css": "/css/backend-custom.6366f7137897ebe08267f74909121944.css", "/css/backend-custom.css": "/css/backend-custom.18e74fbe4c755b817a022d6d3d4e76b1.css",
"/js/backend-custom.js": "/js/backend-custom.e6ea05e1824d0dd8e7c62027c135b7f2.js", "/js/backend-custom.js": "/js/backend-custom.694670b0d97bf54111bac3bd91ba3fcf.js",
"/js/dataTable.js": "/js/dataTable.f968d300a6a0b871f138f114361259c8.js" "/js/dataTable.js": "/js/dataTable.f968d300a6a0b871f138f114361259c8.js"
} }
\ No newline at end of file
...@@ -30,45 +30,6 @@ ...@@ -30,45 +30,6 @@
</div> </div>
</div> </div>
<div class="form-group">
{{ Form::label('address', trans('validation.attributes.frontend.register-user.address'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
{{ Form::input('textarea', 'address', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.address')]) }}
</div>
</div>
{{-- state --}}
<div class="form-group">
{{ Form::label('state_id', trans('validation.attributes.frontend.register-user.state'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
{{ Form::select('state_id', [] , null, ['class' => 'form-control box-size st', 'placeholder' => trans('validation.attributes.frontend.register-user.state'), 'id' => 'state']) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- city --}}
<div class="form-group">
{{ Form::label('city_id', trans('validation.attributes.frontend.register-user.city'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
{{ Form::select('city_id', [], null, ['class' => 'form-control box-size ct', 'placeholder' => trans('validation.attributes.frontend.register-user.city'), 'id' => 'city']) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- zipcode --}}
<div class="form-group">
{{ Form::label('zip_code', trans('validation.attributes.frontend.register-user.zipcode'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
{{ Form::input('name', 'zip_code', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.zipcode')]) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- SSN --}}
<div class="form-group">
{{ Form::label('ssn', trans('validation.attributes.frontend.register-user.ssn'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
{{ Form::input('name', 'ssn', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.ssn')]) }}
</div><!--col-lg-10-->
</div><!--form-group-->
<div class="form-group"> <div class="form-group">
<div class="col-lg-10 col-md-offset-4"> <div class="col-lg-10 col-md-offset-4">
{{ Form::submit(trans('labels.general.buttons.update'), ['class' => 'btn btn-primary', 'id' => 'update-profile']) }} {{ Form::submit(trans('labels.general.buttons.update'), ['class' => 'btn btn-primary', 'id' => 'update-profile']) }}
...@@ -83,57 +44,6 @@ ...@@ -83,57 +44,6 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
Backend.Profile.init(); Backend.Profile.init();
//Getting States of default contry
ajaxCall("{{route('admin.get.states')}}");
//Getting Cities of select State
$("#state").on("change", function() {
var stateId = $(this).val();
var url = "{{route('admin.get.cities')}}";
ajaxCall(url, stateId);
});
function ajaxCall(url, data = null)
{
$.ajax({
url: url,
type: "POST",
data: {stateId: data},
success: function(result) {
if(result != null)
{
if(result.status == "city")
{
var userCity = "{{ $logged_in_user->city_id }}";
var options;
$.each(result.data, function(key, value) {
if(key == userCity)
options += "<option value='" + key + "' selected>" + value + "</option>";
else
options += "<option value='" + key + "'>" + value + "</option>";
});
$("#city").html('');
$("#city").append(options);
}
else
{
var userState = "{{ $logged_in_user->state_id }}";
var options;
$.each(result.data, function(key, value) {
if(key == userState)
options += "<option value='" + key + "' selected>" + value + "</option>";
else
options += "<option value='" + key + "'>" + value + "</option>";
});
$("#state").append(options);
$("#state").trigger('change');
}
}
}
});
}
}); });
</script> </script>
@endsection @endsection
\ No newline at end of file
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<li class="dropdown user user-menu"> <li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="{{ access()->user()->picture }}" class="user-image" alt="User Avatar"/> <img src="{{ access()->user()->picture }}" class="user-image" alt="User Avatar"/>
<span class="hidden-xs">{{ access()->user()->name }}</span> <span class="hidden-xs">{{ access()->user()->first_name }}</span>
<div class="clearfix"></div> <div class="clearfix"></div>
</a> </a>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="wrapper"> <div class="wrapper">
@include('backend.includes.header') @include('backend.includes.header')
@include('backend.includes.sidebar') @include('backend.includes.sidebar-dynamic')
<!-- Content Wrapper. Contains page content --> <!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"> <div class="content-wrapper">
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
<section class="content-header"> <section class="content-header">
@yield('page-header') @yield('page-header')
<!-- Breadcrumbs would render from routes/breadcrumb.php --> <!-- Breadcrumbs would render from routes/breadcrumb.php -->
@if(Breadcrumbs::exists())
{!! Breadcrumbs::render() !!}
@endif
</section> </section>
<!-- Main content --> <!-- Main content -->
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@section('content') @section('content')
{{ Form::open(['route' => 'admin.dummy_small_plural_model.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-dummy_small_model']) }} {{ Form::open(['route' => 'admin.dummy_small_plural_model.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-dummy_small_model']) }}
<div class="box box-success"> <div class="box box-info">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.create') }}</h3> <h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.create') }}</h3>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@section('content') @section('content')
{{ Form::model($dummy_small_model, ['route' => ['admin.dummy_small_plural_model.update', $dummy_small_model], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-dummy_small_model']) }} {{ Form::model($dummy_small_model, ['route' => ['admin.dummy_small_plural_model.update', $dummy_small_model], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-dummy_small_model']) }}
<div class="box box-success"> <div class="box box-info">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.edit') }}</h3> <h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.edit') }}</h3>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@endsection @endsection
@section('content') @section('content')
<div class="box box-success"> <div class="box box-info">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.management') }}</h3> <h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.management') }}</h3>
......
...@@ -3,14 +3,16 @@ ...@@ -3,14 +3,16 @@
* DummyModuleName * DummyModuleName
* *
*/ */
@startNamespace Route::group(['namespace' => 'route_namespace', 'prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () {
Route::group( ['namespace' => 'DummyModel'], function () { @startNamespace
Route::group( ['namespace' => 'DummyModel'], function () {
Route::resource('dummy_name', 'DummyController');
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
});
@endNamespace@startWithoutNamespace
Route::resource('dummy_name', 'DummyController'); Route::resource('dummy_name', 'DummyController');
//For Datatable //For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get'); Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
}); @endWithoutNamespace
@endNamespace@startWithoutNamespace });
Route::resource('dummy_name', 'DummyController'); \ No newline at end of file
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
@endWithoutNamespace
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@section('content') @section('content')
{{ Form::open(['route' => 'admin.modules.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-module', 'files' => true]) }} {{ Form::open(['route' => 'admin.modules.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-module', 'files' => true]) }}
<div class="box box-success"> <div class="box box-info">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ trans('generator::labels.modules.create') }}</h3> <h3 class="box-title">{{ trans('generator::labels.modules.create') }}</h3>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@section('content') @section('content')
{{ Form::model($module, ['route' => ['admin.modules.update', $module], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-module', 'files' => true]) }} {{ Form::model($module, ['route' => ['admin.modules.update', $module], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-module', 'files' => true]) }}
<div class="box box-success"> <div class="box box-info">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ trans('generator::labels.modules.edit') }}</h3> <h3 class="box-title">{{ trans('generator::labels.modules.edit') }}</h3>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@endsection @endsection
@section('content') @section('content')
<div class="box box-success"> <div class="box box-info">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.modules.management') }}</h3> <h3 class="box-title">{{ trans('labels.backend.modules.management') }}</h3>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
@section('after-scripts') @section('after-scripts')
{{-- For DataTables --}} {{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }} {{ Html::script(mix('js/dataTable.js')) }}
<script> <script>
$(function() { $(function() {
var dataTable = $('#modules-table').dataTable({ var dataTable = $('#modules-table').dataTable({
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
} }
}); });
FinBuilders.DataTableSearch.init(dataTable); Backend.DataTableSearch.init(dataTable);
}); });
</script> </script>
@endsection @endsection
\ No newline at end of file
<?php
/**
* Menu Management.
*/
Route::group(['namespace' => 'Menu'], function () {
Route::resource('menus', 'MenuController', ['except' => []]);
//For DataTables
Route::post('menus/get', 'MenuTableController')->name('menus.get');
// for Model Forms
Route::get('menus/get-form/{name?}', 'MenuFormController@create')->name('menus.getform');
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment