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:
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'];
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user