PHP Classes

File: database/sql/laravel_role.sql

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   Laravel Roles and Permissions   database/sql/laravel_role.sql   Download  
File: database/sql/laravel_role.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel Roles and Permissions
Manage application users' roles and permissions
Author: By
Last change:
Date: 1 year ago
Size: 13,273 bytes
 

Contents

Class file image Download
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 25, 2020 at 10:21 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `laravel_role` -- -- -------------------------------------------------------- -- -- Table structure for table `admins` -- CREATE TABLE `admins` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `admins` -- INSERT INTO `admins` (`id`, `name`, `email`, `username`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Super Admin', 'superadmin@example.com', 'superadmin', NULL, '$2y$10$04D4VxiS5fbr8ll6towqjeTK21rP8MHxERjgpTeES5rdLD0c9bIsi', NULL, '2020-09-11 22:33:43', '2020-09-11 22:33:43'), (2, 'Admin', 'admin@gmail.com', 'admin', NULL, '$2y$10$.7HeNIXmdognq7i3eQ8YzOg/EXqzrJsSB0BqfXQBa8iB86JClmCs2', NULL, '2020-09-20 10:35:35', '2020-09-20 10:35:35'), (3, 'Client', 'client@example.com', 'client', NULL, '$2y$10$Nf4rahrK4DohTyAPdJWGeuEHddulfF0D3bANvI9mLNT7svLT88Pge', NULL, '2020-09-20 10:45:00', '2020-09-20 10:45:00'), (4, 'Test Admin', 'test@gmail.com', 'test', NULL, '$2y$10$i8mt.IzUxq9mq/3euOJ8E.CF7gprJCVNyV.mR8Vdn2LQgcLo/8kCi', NULL, '2020-09-25 13:18:32', '2020-09-25 13:18:32'); -- -------------------------------------------------------- -- -- Table structure for table `failed_jobs` -- CREATE TABLE `failed_jobs` ( `id` bigint(20) UNSIGNED NOT NULL, `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29, '2014_10_12_000000_create_users_table', 1), (30, '2014_10_12_100000_create_password_resets_table', 1), (31, '2019_08_19_000000_create_failed_jobs_table', 1), (32, '2020_07_24_184706_create_permission_tables', 1), (33, '2020_09_12_043205_create_admins_table', 2); -- -------------------------------------------------------- -- -- Table structure for table `model_has_permissions` -- CREATE TABLE `model_has_permissions` ( `permission_id` bigint(20) UNSIGNED NOT NULL, `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint(20) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `model_has_roles` -- CREATE TABLE `model_has_roles` ( `role_id` bigint(20) UNSIGNED NOT NULL, `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint(20) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `model_has_roles` -- INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES (1, 'App\\Models\\Admin', 1), (1, 'App\\User', 1), (1, 'App\\User', 3), (6, 'App\\Models\\Admin', 2), (6, 'App\\User', 3), (7, 'App\\Models\\Admin', 3), (8, 'App\\Models\\Admin', 4); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `permissions` -- CREATE TABLE `permissions` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `group_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `permissions` -- INSERT INTO `permissions` (`id`, `name`, `guard_name`, `group_name`, `created_at`, `updated_at`) VALUES (1, 'dashboard.view', 'admin', 'dashboard', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (2, 'dashboard.edit', 'admin', 'dashboard', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (3, 'blog.create', 'admin', 'blog', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (4, 'blog.view', 'admin', 'blog', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (5, 'blog.edit', 'admin', 'blog', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (6, 'blog.delete', 'admin', 'blog', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (7, 'blog.approve', 'admin', 'blog', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (8, 'admin.create', 'admin', 'admin', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (9, 'admin.view', 'admin', 'admin', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (10, 'admin.edit', 'admin', 'admin', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (11, 'admin.delete', 'admin', 'admin', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (12, 'admin.approve', 'admin', 'admin', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (13, 'role.create', 'admin', 'role', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (14, 'role.view', 'admin', 'role', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (15, 'role.edit', 'admin', 'role', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (16, 'role.delete', 'admin', 'role', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (17, 'role.approve', 'admin', 'role', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (18, 'profile.view', 'admin', 'profile', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (19, 'profile.edit', 'admin', 'profile', '2020-07-25 10:43:33', '2020-07-25 10:43:33'); -- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE `roles` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `roles` -- INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES (1, 'superadmin', 'admin', '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (6, 'Admin', 'admin', '2020-08-13 09:44:25', '2020-08-14 02:10:53'), (7, 'Client', 'admin', '2020-09-20 10:44:27', '2020-09-20 10:44:27'), (8, 'Test Role', 'admin', '2020-09-25 13:17:53', '2020-09-25 13:17:53'); -- -------------------------------------------------------- -- -- Table structure for table `role_has_permissions` -- CREATE TABLE `role_has_permissions` ( `permission_id` bigint(20) UNSIGNED NOT NULL, `role_id` bigint(20) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `role_has_permissions` -- INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES (1, 1), (1, 6), (1, 7), (1, 8), (2, 1), (2, 6), (2, 8), (3, 1), (3, 6), (4, 1), (4, 6), (4, 7), (5, 1), (5, 6), (6, 1), (6, 6), (7, 1), (7, 6), (8, 1), (8, 8), (9, 1), (9, 6), (9, 8), (10, 1), (10, 8), (11, 1), (11, 8), (12, 1), (12, 8), (13, 1), (13, 6), (14, 1), (14, 6), (14, 7), (15, 1), (16, 1), (17, 1), (18, 1), (19, 1); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Maniruzzaman Akash', 'manirujjamanakash@gmail.com', NULL, '$2y$10$/WuShlzx6A2xlSdg521Uj./pHpEGB04rB/toeltFTQQnFsR6MY/eG', NULL, '2020-07-25 10:43:33', '2020-07-25 10:43:33'), (3, 'test2', 'admin@akijfood.com', NULL, '$2y$10$/4YK7i2fVqdTfm0WAJM3lOnApbJx4w9vxUBZyjN3HqBTnV0zmcwO.', NULL, '2020-08-14 02:28:22', '2020-08-14 03:07:31'); -- -- Indexes for dumped tables -- -- -- Indexes for table `admins` -- ALTER TABLE `admins` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `admins_email_unique` (`email`), ADD UNIQUE KEY `admins_username_unique` (`username`); -- -- Indexes for table `failed_jobs` -- ALTER TABLE `failed_jobs` ADD PRIMARY KEY (`id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `model_has_permissions` -- ALTER TABLE `model_has_permissions` ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`), ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`); -- -- Indexes for table `model_has_roles` -- ALTER TABLE `model_has_roles` ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`), ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `permissions` -- ALTER TABLE `permissions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `roles` -- ALTER TABLE `roles` ADD PRIMARY KEY (`id`); -- -- Indexes for table `role_has_permissions` -- ALTER TABLE `role_has_permissions` ADD PRIMARY KEY (`permission_id`,`role_id`), ADD KEY `role_has_permissions_role_id_foreign` (`role_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `admins` -- ALTER TABLE `admins` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `failed_jobs` -- ALTER TABLE `failed_jobs` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34; -- -- AUTO_INCREMENT for table `permissions` -- ALTER TABLE `permissions` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; -- -- AUTO_INCREMENT for table `roles` -- ALTER TABLE `roles` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- Constraints for dumped tables -- -- -- Constraints for table `model_has_permissions` -- ALTER TABLE `model_has_permissions` ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE; -- -- Constraints for table `model_has_roles` -- ALTER TABLE `model_has_roles` ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `role_has_permissions` -- ALTER TABLE `role_has_permissions` ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;