Add Franchise and Newsletter management features
- Implemented FranchiseController with CRUD operations and data handling. - Created NewsletterController for managing newsletter subscriptions. - Added routes for Franchise and Newsletter resources in web.php. - Developed views for Franchise and Newsletter management including index, create, edit, and datatable actions. - Introduced form handling and validation for Franchise and Newsletter submissions. - Created database migrations for franchises and newsletters tables. - Updated sidebar configuration to include Franchise and Newsletter sections. - Enhanced client-side forms with AJAX submission for Franchise and Newsletter.
This commit is contained in:
116
Modules/CCMS/app/Http/Controllers/FranchiseController.php
Normal file
116
Modules/CCMS/app/Http/Controllers/FranchiseController.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\CCMS\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Rules\Recaptcha;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Modules\CCMS\Models\Franchise;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
class FranchiseController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
|
||||
public function index()
|
||||
{
|
||||
if (request()->ajax()) {
|
||||
$model = Franchise::query()->latest();
|
||||
return DataTables::eloquent($model)
|
||||
->addIndexColumn()
|
||||
->addColumn('action', 'ccms::franchise.datatable.action')
|
||||
->rawColumns(['action'])
|
||||
->toJson();
|
||||
}
|
||||
return view('ccms::franchise.index', [
|
||||
'title' => 'Franchise List',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
try {
|
||||
$rules = [
|
||||
'first_name' => 'required|string',
|
||||
'email' => 'required|email',
|
||||
];
|
||||
|
||||
if (setting('enable_reCaptcha') == 1) {
|
||||
$rules['g-recaptcha-response'] = ['required', new Recaptcha];
|
||||
}
|
||||
|
||||
$messages = [
|
||||
'email.email' => 'Must be a valid email address.',
|
||||
'g-recaptcha-response.required' => 'Please complete reCAPTCHA validation.',
|
||||
'g-recaptcha-response' => 'Invalid reCAPTCHA.',
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules, $messages);
|
||||
if ($validator->fails()) {
|
||||
return response()->json(['errors' => $validator->errors()], 422);
|
||||
}
|
||||
|
||||
Franchise::create($validator->validated());
|
||||
|
||||
return response()->json(['status' => 200, 'message' => "Thank you for reaching out! Your message has been received and we'll get back to you shortly."], 200);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json(['status' => 500, 'message' => 'Internal server error', 'error' => $e->getMessage()], 500);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$franchise = Franchise::whereId($id)->first();
|
||||
if ($franchise) {
|
||||
$franchise->delete();
|
||||
}
|
||||
return response()->json(['status' => 200, 'message' => 'Franchise has been deleted!'], 200);
|
||||
} catch (\Throwable $th) {
|
||||
return redirect()->back()->with('error', $th->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
115
Modules/CCMS/app/Http/Controllers/NewsletterController.php
Normal file
115
Modules/CCMS/app/Http/Controllers/NewsletterController.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\CCMS\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Rules\Recaptcha;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Modules\CCMS\Models\Newsletter;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
class NewsletterController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
|
||||
public function index()
|
||||
{
|
||||
if (request()->ajax()) {
|
||||
$model = Newsletter::query()->latest();
|
||||
return DataTables::eloquent($model)
|
||||
->addIndexColumn()
|
||||
->addColumn('action', 'ccms::newsletter.datatable.action')
|
||||
->rawColumns(['action'])
|
||||
->toJson();
|
||||
}
|
||||
return view('ccms::newsletter.index', [
|
||||
'title' => 'Newsletter List',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
try {
|
||||
$rules = [
|
||||
'email' => 'required|email',
|
||||
];
|
||||
|
||||
if (setting('enable_reCaptcha') == 1) {
|
||||
$rules['g-recaptcha-response'] = ['required', new Recaptcha];
|
||||
}
|
||||
|
||||
$messages = [
|
||||
'email.email' => 'Must be a valid email address.',
|
||||
'g-recaptcha-response.required' => 'Please complete reCAPTCHA validation.',
|
||||
'g-recaptcha-response' => 'Invalid reCAPTCHA.',
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules, $messages);
|
||||
if ($validator->fails()) {
|
||||
return response()->json(['errors' => $validator->errors()], 422);
|
||||
}
|
||||
|
||||
Newsletter::create($validator->validated());
|
||||
|
||||
return response()->json(['status' => 200, 'message' => "Thank you for reaching out! Your message has been received and we'll get back to you shortly."], 200);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json(['status' => 500, 'message' => 'Internal server error', 'error' => $e->getMessage()], 500);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$newsletter = Newsletter::whereId($id)->first();
|
||||
if ($newsletter) {
|
||||
$newsletter->delete();
|
||||
}
|
||||
return response()->json(['status' => 200, 'message' => 'Newsletter has been deleted!'], 200);
|
||||
} catch (\Throwable $th) {
|
||||
return redirect()->back()->with('error', $th->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
37
Modules/CCMS/app/Models/Franchise.php
Normal file
37
Modules/CCMS/app/Models/Franchise.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\CCMS\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
// use Modules\CCMS\Database\Factories\FranchiseFactory;
|
||||
|
||||
class Franchise extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'first_name',
|
||||
'last_name',
|
||||
'email',
|
||||
'phone',
|
||||
'address',
|
||||
'city',
|
||||
'state',
|
||||
'invest_level',
|
||||
'own_business',
|
||||
'yes_own_des',
|
||||
'franchise_location',
|
||||
'start_time_frame',
|
||||
'office_setup',
|
||||
'website'
|
||||
];
|
||||
|
||||
// protected static function newFactory(): FranchiseFactory
|
||||
// {
|
||||
// // return FranchiseFactory::new();
|
||||
// }
|
||||
}
|
19
Modules/CCMS/app/Models/Newsletter.php
Normal file
19
Modules/CCMS/app/Models/Newsletter.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\CCMS\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
// use Modules\CCMS\Database\Factories\NewsletterFactory;
|
||||
|
||||
class Newsletter extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['email'];
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('newsletters', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('email')->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('newsletters');
|
||||
}
|
||||
};
|
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('franchises', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->string('invest_level')->nullable();
|
||||
$table->string('own_business')->nullable();
|
||||
$table->text('yes_own_des')->nullable();
|
||||
$table->string('franchise_location')->nullable();
|
||||
$table->string('start_time_frame')->nullable();
|
||||
$table->string('office_setup')->nullable();
|
||||
$table->string('website')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('franchises');
|
||||
}
|
||||
};
|
14
Modules/CCMS/resources/views/franchise/create.blade.php
Normal file
14
Modules/CCMS/resources/views/franchise/create.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
{{ html()->form('POST')->route('testimonial.store')->class(['needs-validation'])->attributes(['enctype' => 'multipart/form-data', 'novalidate'])->open() }}
|
||||
|
||||
@include('ccms::testimonial.partials._form')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
@@ -0,0 +1,10 @@
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
|
||||
{{-- <a data-link="{{ route('franchise.markAsRead', $id) }}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Mark as {{ $is_read == 1 ? 'unread' : 'read' }}" data-status="{{ $is_read == 1 ? 'read' : 'unread' }}" --}}
|
||||
{{-- class="fs-15 mark-item"><i class="{{ $is_read == 1 ? ' ri-mail-close-line link-secondary' : ' ri-mail-check-line link-success' }}"></i></a> --}}
|
||||
|
||||
<a href="javascript:void(0);" data-link="{{ route('franchise.destroy', $id) }}" class="link-danger fs-15 remove-item" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Delete">
|
||||
<i class="ri-delete-bin-6-line"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
14
Modules/CCMS/resources/views/franchise/edit.blade.php
Normal file
14
Modules/CCMS/resources/views/franchise/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
{{ html()->modelForm($testimonial, 'PUT')->route('testimonial.update', $testimonial->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('ccms::testimonial.partials._form')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
41
Modules/CCMS/resources/views/franchise/index.blade.php
Normal file
41
Modules/CCMS/resources/views/franchise/index.blade.php
Normal file
@@ -0,0 +1,41 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@php
|
||||
$columns = [
|
||||
[
|
||||
'title' => 'S.N',
|
||||
'data' => 'DT_RowIndex',
|
||||
'name' => 'DT_RowIndex',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
'sortable' => false,
|
||||
],
|
||||
['title' => 'First Name', 'data' => 'name', 'first_name' => 'first_name'],
|
||||
['title' => 'Last Name', 'data' => 'name', 'first_name' => 'first_name'],
|
||||
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
||||
['title' => 'Phone', 'data' => 'phone', 'name' => 'phone'],
|
||||
['title' => 'Address', 'data' => 'address', 'name' => 'address'],
|
||||
['title' => 'City', 'data' => 'city', 'name' => 'city'],
|
||||
['title' => 'State', 'data' => 'state', 'name' => 'state'],
|
||||
['title' => 'Invest Level', 'data' => 'invest_level', 'name' => 'invest_level'],
|
||||
['title' => 'Franchise Location', 'data' => 'franchise_location', 'name' => 'franchise_location'],
|
||||
[
|
||||
'title' => 'Action',
|
||||
'data' => 'action',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
<x-data-table-script :route="route('franchise.index')" :reorder="null" :columns="$columns" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@@ -0,0 +1,71 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-xl-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row gy-3">
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Name')->class('form-label') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Enter Name')->required() }}
|
||||
{{ html()->div('Name is required')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Designation')->class('form-label') }}
|
||||
{{ html()->text('designation')->class('form-control')->placeholder('Enter Designation') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Company')->class('form-label') }}
|
||||
{{ html()->text('company')->class('form-control')->placeholder('Enter Company') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
{{ html()->label('Branch')->class('form-label')->for('branch_id') }}
|
||||
{{ html()->select('branch_id', $branchOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
{{ html()->label('Comment')->class('form-label')->for('description') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->textarea('description')->class('form-control')->rows(10) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
<div class="col-lg-4 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->select('status', config('constants.page_status_options'))->class('form-select choices-select ') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
|
||||
<x-form-buttons :editable="$editable" label="Save" href="{{ route('team.index') }}" />
|
||||
</div>
|
||||
|
||||
<div class="card featured-image-section">
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-0 fs-14">
|
||||
Featured
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Image')->class('form-label')->for('image') }}
|
||||
<x-image-input :editable="$editable" id="image" name="image" :data="$editable ? $testimonial->getRawOriginal('image') : null"
|
||||
:multiple="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
14
Modules/CCMS/resources/views/newsletter/create.blade.php
Normal file
14
Modules/CCMS/resources/views/newsletter/create.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
{{ html()->form('POST')->route('testimonial.store')->class(['needs-validation'])->attributes(['enctype' => 'multipart/form-data', 'novalidate'])->open() }}
|
||||
|
||||
@include('ccms::testimonial.partials._form')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
@@ -0,0 +1,8 @@
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
|
||||
<a href="javascript:void(0);" data-link="{{ route('newsletter.destroy', $id) }}" class="link-danger fs-15 remove-item"
|
||||
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Delete">
|
||||
<i class="ri-delete-bin-6-line"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
14
Modules/CCMS/resources/views/newsletter/edit.blade.php
Normal file
14
Modules/CCMS/resources/views/newsletter/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
{{ html()->modelForm($testimonial, 'PUT')->route('testimonial.update', $testimonial->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('ccms::testimonial.partials._form')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
33
Modules/CCMS/resources/views/newsletter/index.blade.php
Normal file
33
Modules/CCMS/resources/views/newsletter/index.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@php
|
||||
$columns = [
|
||||
[
|
||||
'title' => 'S.N',
|
||||
'data' => 'DT_RowIndex',
|
||||
'name' => 'DT_RowIndex',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
'sortable' => false,
|
||||
],
|
||||
['title' => 'Email', 'data' => 'email', 'name' => 'email'],
|
||||
[
|
||||
'title' => 'Action',
|
||||
'data' => 'action',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
<x-data-table-script :route="route('newsletter.index')" :reorder="null" :columns="$columns" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@@ -0,0 +1,71 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-xl-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row gy-3">
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Name')->class('form-label') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Enter Name')->required() }}
|
||||
{{ html()->div('Name is required')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Designation')->class('form-label') }}
|
||||
{{ html()->text('designation')->class('form-control')->placeholder('Enter Designation') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Company')->class('form-label') }}
|
||||
{{ html()->text('company')->class('form-control')->placeholder('Enter Company') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
{{ html()->label('Branch')->class('form-label')->for('branch_id') }}
|
||||
{{ html()->select('branch_id', $branchOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
{{ html()->label('Comment')->class('form-label')->for('description') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->textarea('description')->class('form-control')->rows(10) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
<div class="col-lg-4 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->select('status', config('constants.page_status_options'))->class('form-select choices-select ') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
|
||||
<x-form-buttons :editable="$editable" label="Save" href="{{ route('team.index') }}" />
|
||||
</div>
|
||||
|
||||
<div class="card featured-image-section">
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-0 fs-14">
|
||||
Featured
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Image')->class('form-label')->for('image') }}
|
||||
<x-image-input :editable="$editable" id="image" name="image" :data="$editable ? $testimonial->getRawOriginal('image') : null"
|
||||
:multiple="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
@@ -10,9 +10,11 @@ use Modules\CCMS\Http\Controllers\CountryController;
|
||||
use Modules\CCMS\Http\Controllers\EnquiryController;
|
||||
use Modules\CCMS\Http\Controllers\FaqCategoryController;
|
||||
use Modules\CCMS\Http\Controllers\FaqController;
|
||||
use Modules\CCMS\Http\Controllers\FranchiseController;
|
||||
use Modules\CCMS\Http\Controllers\GalleryCategoryController;
|
||||
use Modules\CCMS\Http\Controllers\GalleryController;
|
||||
use Modules\CCMS\Http\Controllers\InstitutionController;
|
||||
use Modules\CCMS\Http\Controllers\NewsletterController;
|
||||
use Modules\CCMS\Http\Controllers\PageController;
|
||||
use Modules\CCMS\Http\Controllers\PartnerController;
|
||||
use Modules\CCMS\Http\Controllers\PopupController;
|
||||
@@ -124,5 +126,8 @@ Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/
|
||||
Route::get('enquiry/mark-as-read/{id}', [EnquiryController::class, 'markAsRead'])->name('enquiry.markAsRead');
|
||||
Route::resource('enquiry', EnquiryController::class)->names('enquiry')->only(['index', 'store', 'destroy']);
|
||||
|
||||
Route::resource('franchise', FranchiseController::class)->names('franchise')->only(['index', 'store', 'destroy']);
|
||||
Route::resource('newsletter', NewsletterController::class)->names('newsletter')->only(['index', 'store', 'destroy']);
|
||||
|
||||
Route::resource('counselor', CounselorController::class)->names('counselor')->only(['index', 'store', 'destroy']);
|
||||
});
|
||||
|
Reference in New Issue
Block a user