text: -- phpMyAdmin SQL Dump
  -- version 4.8.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Oct 23, 2018 at 07:18 PM
  -- Server version: 10.1.34-MariaDB
  -- PHP Version: 7.1.19
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  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_blog`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `categories`
  --
  
  CREATE TABLE `categories` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default.png',
    `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 `categories`
  --
  
  INSERT INTO `categories` (`id`, `name`, `slug`, `image`, `created_at`, `updated_at`) VALUES
  (1, 'php', 'php', 'php-2018-08-02-5b6388fdb2130.jpg', '2018-08-02 16:43:10', '2018-08-02 16:43:10'),
  (2, 'laravel', 'laravel', 'laravel-2018-08-02-5b638990108b2.jpg', '2018-08-02 16:45:36', '2018-08-02 16:45:36'),
  (3, 'vue js', 'vue-js', 'vue-js-2018-08-02-5b638a2b0f4a4.jpg', '2018-08-02 16:48:11', '2018-08-02 16:48:11'),
  (4, 'phpunit', 'phpunit', 'phpunit-2018-08-06-5b68cc597972b.png', '2018-08-02 16:49:43', '2018-08-06 16:31:54'),
  (5, 'java', 'java', 'java-2018-08-11-5b6f186cd1256.jpg', '2018-08-11 11:10:05', '2018-08-11 11:10:05'),
  (6, 'html', 'html', 'html-2018-08-11-5b6f202f7c8ab.jpg', '2018-08-11 11:43:11', '2018-08-11 11:43:11'),
  (7, 'Codeigniter', 'codeigniter', 'codeigniter-2018-08-11-5b6f3c55e65b9.png', '2018-08-11 13:43:18', '2018-08-11 13:43:18'),
  (8, 'CSS', 'css', 'css-2018-08-11-5b6f3ffb3bdfd.jpg', '2018-08-11 13:51:48', '2018-10-06 08:57:27');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `category_post`
  --
  
  CREATE TABLE `category_post` (
    `id` int(10) UNSIGNED NOT NULL,
    `post_id` int(11) NOT NULL,
    `category_id` int(11) 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 `category_post`
  --
  
  INSERT INTO `category_post` (`id`, `post_id`, `category_id`, `created_at`, `updated_at`) VALUES
  (1, 1, 2, '2018-08-02 17:15:57', '2018-08-02 17:15:57'),
  (2, 2, 2, '2018-08-03 14:51:24', '2018-08-03 14:51:24'),
  (3, 3, 2, '2018-08-11 14:55:51', '2018-08-11 14:55:51'),
  (4, 3, 3, '2018-08-11 14:55:51', '2018-08-11 14:55:51'),
  (6, 5, 2, '2018-08-17 13:31:18', '2018-08-17 13:31:18'),
  (7, 6, 1, '2018-10-06 09:28:39', '2018-10-06 09:28:39'),
  (8, 6, 2, '2018-10-06 09:28:39', '2018-10-06 09:28:39');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `comments`
  --
  
  CREATE TABLE `comments` (
    `id` int(10) UNSIGNED NOT NULL,
    `post_id` int(10) UNSIGNED NOT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `comment` text 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 `comments`
  --
  
  INSERT INTO `comments` (`id`, `post_id`, `user_id`, `comment`, `created_at`, `updated_at`) VALUES
  (3, 2, 1, 'second comment', '2018-09-04 16:05:27', '2018-09-04 16:05:27');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `jobs`
  --
  
  CREATE TABLE `jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `attempts` tinyint(3) UNSIGNED NOT NULL,
    `reserved_at` int(10) UNSIGNED DEFAULT NULL,
    `available_at` int(10) UNSIGNED NOT NULL,
    `created_at` int(10) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `jobs`
  --
  
  INSERT INTO `jobs` (`id`, `queue`, `payload`, `attempts`, `reserved_at`, `available_at`, `created_at`) VALUES
  (1, 'default', '{\"displayName\":\"App\\\\Notifications\\\\NewAuthorPost\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"timeout\":null,\"timeoutAt\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":9:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\User\\\";s:2:\\\"id\\\";i:1;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:12:\\\"notification\\\";O:31:\\\"App\\\\Notifications\\\\NewAuthorPost\\\":8:{s:4:\\\"post\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\Post\\\";s:2:\\\"id\\\";i:2;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:2:\\\"id\\\";s:36:\\\"b715e60c-eb28-4218-a48f-c99d1391cf46\\\";s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}\"}}', 0, NULL, 1533329489, 1533329489),
  (2, 'default', '{\"displayName\":\"App\\\\Notifications\\\\NewAuthorPost\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"timeout\":null,\"timeoutAt\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":9:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\User\\\";s:2:\\\"id\\\";i:1;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:12:\\\"notification\\\";O:31:\\\"App\\\\Notifications\\\\NewAuthorPost\\\":8:{s:4:\\\"post\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\Post\\\";s:2:\\\"id\\\";i:5;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:2:\\\"id\\\";s:36:\\\"a8bfc463-3972-4bfa-afab-5021938b5021\\\";s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}\"}}', 0, NULL, 1534534280, 1534534280),
  (3, 'default', '{\"displayName\":\"App\\\\Notifications\\\\AuthorPostApproved\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"timeout\":null,\"timeoutAt\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":9:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\User\\\";s:2:\\\"id\\\";i:2;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:12:\\\"notification\\\";O:36:\\\"App\\\\Notifications\\\\AuthorPostApproved\\\":8:{s:4:\\\"post\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\Post\\\";s:2:\\\"id\\\";i:5;s:9:\\\"relations\\\";a:1:{i:0;s:4:\\\"user\\\";}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:2:\\\"id\\\";s:36:\\\"393c7c33-9e3f-4b51-aaa5-09c0f52d2ef9\\\";s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}\"}}', 0, NULL, 1534972998, 1534972998),
  (4, 'default', '{\"displayName\":\"App\\\\Notifications\\\\NewAuthorPost\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"timeout\":null,\"timeoutAt\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":9:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\User\\\";s:2:\\\"id\\\";i:1;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:12:\\\"notification\\\";O:31:\\\"App\\\\Notifications\\\\NewAuthorPost\\\":8:{s:4:\\\"post\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\Post\\\";s:2:\\\"id\\\";i:6;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:2:\\\"id\\\";s:36:\\\"f59c2bf8-6d4f-4153-8f07-cc05c0038835\\\";s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}\"}}', 0, NULL, 1538839723, 1538839723),
  (5, 'default', '{\"displayName\":\"App\\\\Notifications\\\\AuthorPostApproved\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"timeout\":null,\"timeoutAt\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":9:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\User\\\";s:2:\\\"id\\\";i:2;s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:12:\\\"notification\\\";O:36:\\\"App\\\\Notifications\\\\AuthorPostApproved\\\":8:{s:4:\\\"post\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\Post\\\";s:2:\\\"id\\\";i:6;s:9:\\\"relations\\\";a:1:{i:0;s:4:\\\"user\\\";}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:2:\\\"id\\\";s:36:\\\"8f9b0b21-f83e-492f-ad23-531ed4a064cb\\\";s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}\"}}', 0, NULL, 1539288081, 1539288081),
  (6, 'default', '{\"displayName\":\"App\\\\Notifications\\\\NewPostNotify\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"timeout\":null,\"timeoutAt\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":9:{s:11:\\\"notifiables\\\";O:44:\\\"Illuminate\\\\Notifications\\\\AnonymousNotifiable\\\":1:{s:6:\\\"routes\\\";a:1:{s:4:\\\"mail\\\";s:24:\\\"mdabusayed4400@gmail.com\\\";}}s:12:\\\"notification\\\";O:31:\\\"App\\\\Notifications\\\\NewPostNotify\\\":8:{s:4:\\\"post\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":4:{s:5:\\\"class\\\";s:8:\\\"App\\\\Post\\\";s:2:\\\"id\\\";i:6;s:9:\\\"relations\\\";a:1:{i:0;s:4:\\\"user\\\";}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";}s:2:\\\"id\\\";s:36:\\\"9660a039-cc8d-4937-bd98-d454f7b0181e\\\";s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}s:10:\\\"connection\\\";N;s:5:\\\"queue\\\";N;s:15:\\\"chainConnection\\\";N;s:10:\\\"chainQueue\\\";N;s:5:\\\"delay\\\";N;s:7:\\\"chained\\\";a:0:{}}\"}}', 0, NULL, 1539288081, 1539288081);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(191) 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
  (1, '2014_10_12_000000_create_users_table', 1),
  (2, '2014_10_12_100000_create_password_resets_table', 1),
  (3, '2018_05_01_194326_create_roles_table', 1),
  (4, '2018_05_04_190955_create_tags_table', 1),
  (5, '2018_05_05_204605_create_categories_table', 1),
  (6, '2018_05_07_170919_create_posts_table', 1),
  (7, '2018_05_07_171356_create_category_post_table', 1),
  (8, '2018_05_07_171536_create_post_tag_table', 1),
  (9, '2018_07_29_173112_create_subscribers_table', 1),
  (10, '2018_07_30_205649_create_jobs_table', 1),
  (11, '2018_08_03_210830_create_post_user_table', 2),
  (12, '2018_08_27_225240_create_comments_table', 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(191) 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 `posts`
  --
  
  CREATE TABLE `posts` (
    `id` int(10) UNSIGNED NOT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `slug` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default.png',
    `body` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `view_count` int(11) NOT NULL DEFAULT '0',
    `status` tinyint(1) NOT NULL DEFAULT '0',
    `is_approved` tinyint(1) NOT NULL DEFAULT '0',
    `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 `posts`
  --
  
  INSERT INTO `posts` (`id`, `user_id`, `title`, `slug`, `image`, `body`, `view_count`, `status`, `is_approved`, `created_at`, `updated_at`) VALUES
  (1, 1, 'laravel framework', 'laravel-framework', 'laravel-framework-2018-08-02-5b6390ace7aaf.jpg', '<p>laravel framework description</p>', 6, 1, 1, '2018-08-02 17:15:57', '2018-10-11 13:46:52'),
  (2, 1, 'laravel post by author', 'laravel-post-by-author', 'laravel-post-by-author-2018-08-06-5b68d0992312d.png', '<p>laravel post description by author</p>', 9, 1, 1, '2018-08-03 14:51:23', '2018-10-12 11:24:40'),
  (3, 1, 'vue+laravel framework title', 'vuelaravel-framework-title', 'vuelaravel-framework-title-2018-08-11-5b6f4fbe38291.jpg', '<p>vue_laravel description</p>', 8, 1, 1, '2018-08-11 14:55:51', '2018-10-11 13:52:07'),
  (5, 2, 'laravel framework  lk', 'laravel-framework-lk', 'laravel-framework-lk-2018-08-17-5b772285357ae.jpg', '<p>description</p>', 13, 1, 1, '2018-08-17 13:31:18', '2018-10-12 11:24:30'),
  (6, 2, 'laravel framework by author', 'laravel-framework-by-author', 'laravel-framework-by-author-2018-10-06-5bb8d4a3b3a9a.jpg', '<p><strong>Lorem Ipsum</strong>&nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>', 3, 1, 1, '2018-10-06 09:28:39', '2018-10-12 11:22:25');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `post_tag`
  --
  
  CREATE TABLE `post_tag` (
    `id` int(10) UNSIGNED NOT NULL,
    `post_id` int(11) NOT NULL,
    `tag_id` int(11) 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 `post_tag`
  --
  
  INSERT INTO `post_tag` (`id`, `post_id`, `tag_id`, `created_at`, `updated_at`) VALUES
  (2, 2, 1, '2018-08-03 14:51:24', '2018-08-03 14:51:24'),
  (3, 2, 2, '2018-08-03 14:51:24', '2018-08-03 14:51:24'),
  (5, 5, 1, '2018-08-17 13:31:18', '2018-08-17 13:31:18'),
  (6, 5, 3, '2018-09-05 15:35:53', '2018-09-05 15:35:53'),
  (7, 3, 1, '2018-10-06 05:25:12', '2018-10-06 05:25:12'),
  (8, 1, 3, '2018-10-06 09:24:32', '2018-10-06 09:24:32'),
  (9, 6, 1, '2018-10-06 09:28:39', '2018-10-06 09:28:39'),
  (10, 6, 3, '2018-10-06 09:28:39', '2018-10-06 09:28:39');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `post_user`
  --
  
  CREATE TABLE `post_user` (
    `id` int(10) UNSIGNED NOT NULL,
    `post_id` int(10) UNSIGNED NOT NULL,
    `user_id` int(11) 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 `post_user`
  --
  
  INSERT INTO `post_user` (`id`, `post_id`, `user_id`, `created_at`, `updated_at`) VALUES
  (3, 3, 1, '2018-08-23 18:01:59', '2018-08-23 18:01:59'),
  (7, 2, 1, '2018-08-24 17:04:06', '2018-08-24 17:04:06'),
  (9, 5, 1, '2018-10-07 13:54:01', '2018-10-07 13:54:01'),
  (10, 5, 2, '2018-10-07 13:57:06', '2018-10-07 13:57:06'),
  (12, 2, 2, '2018-10-09 12:41:20', '2018-10-09 12:41:20'),
  (13, 1, 1, '2018-10-10 13:28:27', '2018-10-10 13:28:27');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE `roles` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `slug` varchar(191) 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`, `slug`, `created_at`, `updated_at`) VALUES
  (1, 'Admin', 'admin', NULL, NULL),
  (2, 'Author', 'author', NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `subscribers`
  --
  
  CREATE TABLE `subscribers` (
    `id` int(10) UNSIGNED NOT NULL,
    `email` varchar(191) 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 `subscribers`
  --
  
  INSERT INTO `subscribers` (`id`, `email`, `created_at`, `updated_at`) VALUES
  (1, 'mdabusayed4400@gmail.com', '2018-10-06 14:04:28', '2018-10-06 14:04:28');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tags`
  --
  
  CREATE TABLE `tags` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `slug` varchar(191) 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 `tags`
  --
  
  INSERT INTO `tags` (`id`, `name`, `slug`, `created_at`, `updated_at`) VALUES
  (1, 'php', 'php', '2018-08-02 17:06:05', '2018-08-02 17:06:05'),
  (3, 'phpunit', 'phpunit', '2018-08-02 17:07:20', '2018-08-02 17:07:20');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `role_id` int(11) NOT NULL DEFAULT '2',
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default.png',
    `about` text COLLATE utf8mb4_unicode_ci,
    `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`, `role_id`, `name`, `username`, `email`, `password`, `image`, `about`, `remember_token`, `created_at`, `updated_at`) VALUES
  (1, 1, 'Md.Admin', 'admin', 'sayedme120@gmail.com', '$2y$10$L8hLuj1blo7BsRzzsw.wwuuZBt7o1gFmZQ0L0xkz70kmt.sRU7WM2', 'mdadmin-2018-08-02-5b6390fc7646c.jpg', 'demo text for admin', 'A9GcZWE6QZ4tghRbsyHFoEDHpqGfEMgfnMA1r2FzFmZBcg1d98ShlgvtIQoG', '2018-10-01 22:22:30', '2018-08-24 16:39:58'),
  (2, 2, 'Md.Author', 'author', 'author@gmail.com', '$2y$10$qCdwsl8prLUH0yI3/QufHuvoi8BL9c8UmvdwOanY5/poajZm1Hs52', 'mdauthor-2018-08-03-5b64b72356fb1.JPG', 'some text for author', 'UHj3bpXQnt6gU05sK2l2StEeLgyYVcfD1BfDADsQfrtsP8FWIt5MPSdhEOj8', '2018-09-30 23:29:43', '2018-08-03 14:14:49'),
  (4, 2, 'md jamil', 'md jamil', 'admin@gmail.com', '$2y$10$NQGkIzrKNBg09zO6jLwU5.DefVUGVfBw1P27EghUxZUAZLHlcUr86', 'default.png', NULL, '4b2guy9dsHhmkGs2kOrd04f0VKq7hCgXArqpfG4PBOIDS5GZMiZ8x25DYN8s', '2018-08-25 17:35:19', '2018-08-25 17:35:19'),
  (5, 2, 'Md. Author', 'authorone', 'authorone@gmail.com', '$2y$10$XnwrL0FD.1MOLbphjUpOcunBlfSUgoYA4MzTkdYi/HFxNXLXsT2zm', 'md-author-2018-10-07-5bb9cc1bb8fc7.png', NULL, 'Jha5ND1qaEVwKEAkQxLR1LFXuAatkElnQ0cRbmPM4fV8JP5BNFCLgOBPPIf7', '2018-10-07 03:03:34', '2018-10-07 03:04:28');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `categories`
  --
  ALTER TABLE `categories`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `category_post`
  --
  ALTER TABLE `category_post`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `comments`
  --
  ALTER TABLE `comments`
    ADD PRIMARY KEY (`id`),
    ADD KEY `comments_post_id_foreign` (`post_id`),
    ADD KEY `comments_user_id_foreign` (`user_id`);
  
  --
  -- Indexes for table `jobs`
  --
  ALTER TABLE `jobs`
    ADD PRIMARY KEY (`id`),
    ADD KEY `jobs_queue_index` (`queue`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `posts`
  --
  ALTER TABLE `posts`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `posts_slug_unique` (`slug`),
    ADD KEY `posts_user_id_foreign` (`user_id`);
  
  --
  -- Indexes for table `post_tag`
  --
  ALTER TABLE `post_tag`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `post_user`
  --
  ALTER TABLE `post_user`
    ADD PRIMARY KEY (`id`),
    ADD KEY `post_user_post_id_foreign` (`post_id`);
  
  --
  -- Indexes for table `roles`
  --
  ALTER TABLE `roles`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `subscribers`
  --
  ALTER TABLE `subscribers`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `tags`
  --
  ALTER TABLE `tags`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_username_unique` (`username`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `categories`
  --
  ALTER TABLE `categories`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  
  --
  -- AUTO_INCREMENT for table `category_post`
  --
  ALTER TABLE `category_post`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  
  --
  -- AUTO_INCREMENT for table `comments`
  --
  ALTER TABLE `comments`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `jobs`
  --
  ALTER TABLE `jobs`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
  
  --
  -- AUTO_INCREMENT for table `posts`
  --
  ALTER TABLE `posts`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `post_tag`
  --
  ALTER TABLE `post_tag`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
  
  --
  -- AUTO_INCREMENT for table `post_user`
  --
  ALTER TABLE `post_user`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
  
  --
  -- AUTO_INCREMENT for table `roles`
  --
  ALTER TABLE `roles`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `subscribers`
  --
  ALTER TABLE `subscribers`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `tags`
  --
  ALTER TABLE `tags`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `comments`
  --
  ALTER TABLE `comments`
    ADD CONSTRAINT `comments_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `posts`
  --
  ALTER TABLE `posts`
    ADD CONSTRAINT `posts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `post_user`
  --
  ALTER TABLE `post_user`
    ADD CONSTRAINT `post_user_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`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 */;
  