File: /var/www/html/owlcrm/database/seeders/PermissionsSeeder.php
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class PermissionsSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$permissions = [
['title' => 'Add Lead', 'key' => 'add_lead', 'description' => 'Grants the ability to create new lead', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit Own Lead', 'key' => 'edit_own_lead', 'description' => 'Grants the ability to modify their own lead', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete Own Lead', 'key' => 'delete_own_lead ', 'description' => 'Grants the ability to remove their own lead', 'module_id' => null, 'created_by' => 1],
['title' => 'View Own Lead', 'key' => 'view_own_lead', 'description' => 'Grants the ability to view their own lead', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Lead', 'key' => 'view_all_lead', 'description' => 'Grants the ability to view all lead detail', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit All Lead', 'key' => 'edit_all_lead', 'description' => 'Grants the ability to modify their own lead', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete All Lead', 'key' => 'delete_all_lead', 'description' => 'Grants the ability to remove their own lead', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Lead', 'key' => 'view_all_lead', 'description' => 'Grants the ability to view all lead details', 'module_id' => null, 'created_by' => 1],
['title' => 'Add User', 'key' => 'add_user', 'description' => 'Grants the ability to create new User', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit Own User', 'key' => 'edit_own_user', 'description' => 'Grants the ability to modify their own user', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete Own User', 'key' => 'delete_own_user', 'description' => 'Grants the ability to remove their own user', 'module_id' => null, 'created_by' => 1],
['title' => 'View Own User', 'key' => 'view_own_user', 'description' => 'Grants the ability to view their own user', 'module_id' => null, 'created_by' => 1],
['title' => 'View All User', 'key' => 'view_all_user', 'description' => 'Grants the ability to view all user details', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit All User', 'key' => 'edit_all_user', 'description' => 'Grants the ability to modify their own user', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete All User', 'key' => 'delete_all_user', 'description' => 'Grants the ability to remove their own user', 'module_id' => null, 'created_by' => 1],
['title' => 'View All User', 'key' => 'view_all_user', 'description' => 'Grants the ability to view all user details', 'module_id' => null, 'created_by' => 1],
['title' => 'Add Company', 'key' => 'add_company', 'description' => 'Grants the ability to create new Company', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit Own Company', 'key' => 'edit_own_company', 'description' => 'Grants the ability to modify their own Company', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete Own Company', 'key' => 'delete_own_company', 'description' => 'Grants the ability to remove their own Company', 'module_id' => null, 'created_by' => 1],
['title' => 'View Own Company', 'key' => 'view_own_company', 'description' => 'Grants the ability to view their own Company', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Company', 'key' => 'view_all_company', 'description' => 'Grants the ability to view all Company details', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit All Company', 'key' => 'edit_all_company', 'description' => 'Grants the ability to modify their own Company', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete All Company', 'key' => 'delete_all_company', 'description' => 'Grants the ability to remove their own Company', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Company', 'key' => 'view_all_company', 'description' => 'Grants the ability to view all Company details', 'module_id' => null, 'created_by' => 1],
['title' => 'Add Project', 'key' => 'add_project', 'description' => 'Grants the ability to create new Project', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit Own Project', 'key' => 'edit_own_project', 'description' => 'Grants the ability to modify their own Project', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete Own Project', 'key' => 'delete_own_project', 'description' => 'Grants the ability to remove their own Project', 'module_id' => null, 'created_by' => 1],
['title' => 'View Own Project', 'key' => 'view_own_project', 'description' => 'Grants the ability to view their own Project', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Project', 'key' => 'view_all_project', 'description' => 'Grants the ability to view all Project details', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit All Project', 'key' => 'edit_all_project', 'description' => 'Grants the ability to modify their own Project', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete All Project', 'key' => 'delete_all_project', 'description' => 'Grants the ability to remove their own Project', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Project', 'key' => 'view_all_project', 'description' => 'Grants the ability to view all Project details', 'module_id' => null, 'created_by' => 1],
['title' => 'Add Property', 'key' => 'add_property', 'description' => 'Grants the ability to create new Property', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit Own Property', 'key' => 'edit_own_property', 'description' => 'Grants the ability to modify their own Property', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete Own Property', 'key' => 'delete_own_property', 'description' => 'Grants the ability to remove their own Property', 'module_id' => null, 'created_by' => 1],
['title' => 'View Own Property', 'key' => 'view_own_property', 'description' => 'Grants the ability to view their own Property', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Property', 'key' => 'view_all_property', 'description' => 'Grants the ability to view all Property details', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit All Property', 'key' => 'edit_all_property', 'description' => 'Grants the ability to modify their own Property', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete All Property', 'key' => 'delete_all_property', 'description' => 'Grants the ability to remove their own Property', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Property', 'key' => 'view_all_property', 'description' => 'Grants the ability to view all Property details', 'module_id' => null, 'created_by' => 1],
['title' => 'Add Amenity', 'key' => 'add_amenity', 'description' => 'Grants the ability to create new Amenity', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit Own Amenity', 'key' => 'edit_own_amenity', 'description' => 'Grants the ability to modify their own Amenity', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete Own Amenity', 'key' => 'delete_own_amenity', 'description' => 'Grants the ability to remove their own Amenity', 'module_id' => null, 'created_by' => 1],
['title' => 'View Own Amenity', 'key' => 'view_own_amenity', 'description' => 'Grants the ability to view their own Amenity', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Amenity', 'key' => 'view_all_amenity', 'description' => 'Grants the ability to view all Amenity details', 'module_id' => null, 'created_by' => 1],
['title' => 'Edit All Amenity', 'key' => 'edit_all_amenity', 'description' => 'Grants the ability to modify their own Amenity', 'module_id' => null, 'created_by' => 1],
['title' => 'Delete All Amenity', 'key' => 'delete_all_amenity', 'description' => 'Grants the ability to remove their own Amenity', 'module_id' => null, 'created_by' => 1],
['title' => 'View All Amenity', 'key' => 'view_all_amenity', 'description' => 'Grants the ability to view all Amenity details', 'module_id' => null, 'created_by' => 1],
];
DB::table('permissions')->insert($permissions);
}
}