-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 09, 2025 at 08:42 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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: `newssite`
--

-- --------------------------------------------------------

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `description` longtext DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `meta_keywords` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `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`, `created_by`, `description`, `meta_description`, `meta_keywords`, `status`, `created_at`, `updated_at`) VALUES
(3, 'Sports', 'sports', 1, 'Sports', 'Sports', NULL, 1, '2025-07-20 10:10:48', '2025-07-23 06:53:28'),
(4, 'Technology', 'technology', 1, 'Technology', 'Technology', 'Technology', 1, '2025-07-23 06:39:39', '2025-07-23 06:39:39'),
(5, 'Business', 'business', 1, 'Business', 'Business', 'Business', 1, '2025-07-23 06:40:01', '2025-07-23 06:40:01'),
(6, 'Entertainment', 'entertainment', 1, 'Entertainment', 'Entertainment', 'Entertainment', 1, '2025-07-23 06:40:26', '2025-07-23 06:40:26');

-- --------------------------------------------------------

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_id` bigint(20) UNSIGNED NOT NULL,
  `content` longtext NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `status` 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;

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext 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;

-- --------------------------------------------------------

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `media`
--

CREATE TABLE `media` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL DEFAULT 'image',
  `url` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) 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) 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, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2025_07_17_162757_create_site_settings_table', 1),
(5, '2025_07_17_162804_create_categories_table', 1),
(6, '2025_07_17_162816_create_tags_table', 1),
(7, '2025_07_17_162825_create_posts_table', 1),
(8, '2025_07_17_162901_create_post_tag_table', 1),
(9, '2025_07_17_162910_create_media_table', 1),
(11, '2025_07_23_164247_create_comment_table', 2),
(12, '2025_07_23_173245_create_newsletters_table', 3),
(13, '2025_07_24_162511_create_pages_table', 4);

-- --------------------------------------------------------

--
-- Table structure for table `newsletters`
--

CREATE TABLE `newsletters` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `email` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `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 `newsletters`
--

INSERT INTO `newsletters` (`id`, `email`, `status`, `created_at`, `updated_at`) VALUES
(1, 'kundan@gmail.com', 1, '2025-07-24 09:59:46', '2025-07-24 09:59:46');

-- --------------------------------------------------------

--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text DEFAULT NULL,
  `meta_description` longtext DEFAULT NULL,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `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 `pages`
--

INSERT INTO `pages` (`id`, `title`, `slug`, `content`, `meta_description`, `meta_keywords`, `status`, `created_at`, `updated_at`) VALUES
(2, 'About Us', 'about-us', '<p>trdyugbnlkm;6drytuvbjkln[0ioj;hkb.ydtyfjkblnlm/[p&#39;;ohljhnsyhcgjvb,m .p[i;khljvmbndtyjhvj m,[pi&#39;;jl.bmdutjchvm ,&#39;pj;ln.,bdjchvbm &#39;pj;ln., ffjhvm ,&#39;pjl/n.ifkvjb,m&nbsp;</p>', NULL, NULL, 1, '2025-07-24 12:22:03', '2025-07-24 12:22:03'),
(3, 'Privacy', 'privacy', '<p>To add <strong>pagination</strong> to your query in Laravel, you can replace the <code>get()</code> method with the <code>paginate()</code> method. The <code>paginate()</code> method will automatically handle the pagination logic and return a paginated result.</p>\r\n\r\n<h3>Updated Query with Pagination:</h3>\r\n\r\n<pre>\r\n\r\n&nbsp;</pre>\r\n\r\n<p>php</p>\r\n\r\n<p>CopyEdit</p>\r\n\r\n<p><code>$posts = Post::with(&#39;author&#39;, &#39;category&#39;) -&gt;where(&#39;category_id&#39;, $category-&gt;id) -&gt;where(&#39;status&#39;, 1) -&gt;paginate(10); // 10 posts per page </code></p>\r\n\r\n<h3>Explanation:</h3>\r\n\r\n<ul>\r\n	<li>\r\n	<p><strong><code>paginate(10)</code></strong>: This will fetch 10 posts per page. You can adjust this number to display more or fewer posts per page.</p>\r\n	</li>\r\n	<li>\r\n	<p><strong><code>paginate()</code></strong> automatically handles the SQL queries required for pagination (i.e., it adds <code>LIMIT</code> and <code>OFFSET</code> to your query).</p>\r\n	</li>\r\n	<li>\r\n	<p>It also provides an easy-to-use pagination object, which includes pagination links and additional metadata.</p>\r\n	</li>\r\n</ul>\r\n\r\n<h3>Displaying Paginated Results in Blade:</h3>\r\n\r\n<p>In your Blade view, you can use the <code>links()</code> method to generate pagination links:</p>\r\n\r\n<pre>\r\n\r\n&nbsp;</pre>\r\n\r\n<p>blade</p>\r\n\r\n<p>CopyEdit</p>\r\n\r\n<p><code>{{-- Assuming $posts is passed to the view --}} &lt;div class=&quot;row&quot;&gt; @foreach ($posts as $post) &lt;div class=&quot;col-md-4&quot;&gt; &lt;!-- Post content --&gt; &lt;h3&gt;{{ $post-&gt;title }}&lt;/h3&gt; &lt;p&gt;{{ Str::limit($post-&gt;content, 150) }}&lt;/p&gt; &lt;a href=&quot;{{ route(&#39;post.view&#39;, $post-&gt;slug) }}&quot;&gt;Read more&lt;/a&gt; &lt;/div&gt; @endforeach &lt;/div&gt; {{-- Pagination links --}} &lt;div class=&quot;pagination-container&quot;&gt; {{ $posts-&gt;links() }} &lt;/div&gt; </code></p>\r\n\r\n<h3>Explanation of Pagination Links:</h3>\r\n\r\n<ul>\r\n	<li>\r\n	<p><code>{{ $posts-&gt;links() }}</code>: This will render the pagination links (previous, next, and page numbers).</p>\r\n	</li>\r\n	<li>\r\n	<p><strong>Bootstrap</strong>: Laravel uses the <strong>Bootstrap</strong> default pagination view, so the links will automatically be styled like a Bootstrap pagination component.</p>\r\n	</li>\r\n</ul>\r\n\r\n<h3>Customizing the Number of Items per Page:</h3>\r\n\r\n<p>If you want to let users control the number of items per page, you can replace <code>paginate(10)</code> with a dynamic value:</p>\r\n\r\n<pre>\r\n\r\n&nbsp;</pre>\r\n\r\n<p>php</p>\r\n\r\n<p>CopyEdit</p>\r\n\r\n<p><code>$perPage = request()-&gt;get(&#39;perPage&#39;, 10); // Default to 10 if not specified $posts = Post::with(&#39;author&#39;, &#39;category&#39;) -&gt;where(&#39;category_id&#39;, $category-&gt;id) -&gt;where(&#39;status&#39;, 1) -&gt;paginate($perPage); </code></p>\r\n\r\n<p>This will allow users to specify the number of items per page, and the default will be 10 if not specified in the query string (e.g., <code>?perPage=20</code>).</p>\r\n\r\n<h3>Conclusion:</h3>\r\n\r\n<ul>\r\n	<li>\r\n	<p><strong><code>paginate(10)</code></strong> will handle pagination with a limit of 10 posts per page.</p>\r\n	</li>\r\n	<li>\r\n	<p><strong><code>$posts-&gt;links()</code></strong> will render the pagination links in your Blade view.</p>\r\n	</li>\r\n	<li>\r\n	<p>Pagination is an excellent way to improve performance and user experience when displaying large datasets.</p>\r\n	</li>\r\n</ul>\r\n\r\n<p>Let me know if you need further customization or explanations!</p>', NULL, NULL, 1, '2025-08-09 12:44:16', '2025-08-09 12:44:16');

-- --------------------------------------------------------

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) 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` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL,
  `post_by` bigint(20) UNSIGNED NOT NULL,
  `content` longtext NOT NULL,
  `views` int(11) NOT NULL DEFAULT 0,
  `featured_image` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `published_at` timestamp NULL DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `meta_keywords` text DEFAULT NULL,
  `is_featured` tinyint(1) NOT NULL DEFAULT 0,
  `deleted_at` timestamp NULL 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 `posts`
--

INSERT INTO `posts` (`id`, `title`, `slug`, `category_id`, `post_by`, `content`, `views`, `featured_image`, `status`, `published_at`, `meta_description`, `meta_keywords`, `is_featured`, `deleted_at`, `created_at`, `updated_at`) VALUES
(5, 'technology how to handel frontend', 'live-server-issues', 3, 1, '<p>बहुत बढ़िया सवाल! जब आप अपनी Laravel वेबसाइट को <strong>live server</strong> (जैसे: cPanel, DigitalOcean, AWS, etc.) पर होस्ट करते हैं, तो आपको <strong>image upload और fetch</strong> के लिए कुछ जरूरी चीज़ों का ध्यान रखना होता है।</p><h3>✅ Step-by-step Guide for Live Server:</h3><h3>🔹 1. 📤 <strong>Image Upload Logic (same as local)</strong></h3><p>कोड वही रहेगा जो आपने अभी तक लिखा है — जैसे:</p><p>php</p><p>CopyEdit</p><p>$file-&gt;storeAs(\'posts\', $filename, \'public\');</p><blockquote><p>यह इमेज को storage/app/public/posts/ में सेव करेगा।</p></blockquote><h3>🔹 2. 🧭 <strong>Make sure /storage link exists</strong></h3><p>Live server पर आपको एक बार यह कमांड चलानी होती है:</p><p>bash</p><p>CopyEdit</p><p>php artisan storage:link&nbsp;</p><p>🔸 इससे Laravel एक symbolic link बनाएगा:</p><p>From: public/storage</p><p>To: storage/app/public</p><p>✅ अब आपकी images इस तरह accessible होंगी:</p><p>ruby</p><p>CopyEdit</p><p>https://yourdomain.com/storage/posts/image.jpg</p><blockquote><p>अगर आप cPanel यूज़ कर रहे हैं और SSH access नहीं है, तो आप symbolic link manually भी बना सकते हैं — मैं नीचे बताऊंगा कैसे।</p></blockquote><h3>🔹 3. 📁 <strong>Set Correct File Permissions</strong></h3><p>Live server पर Laravel को <strong>write access</strong> चाहिए:</p><p>storage/ और bootstrap/cache/ फोल्डर पर <strong>write permission</strong> दें:</p><p>bash</p><p>CopyEdit</p><p>chmod -R 775 storage chmod -R 775 bootstrap/cache</p><p>या कुछ server पर:</p><p>bash</p><p>CopyEdit</p><p>chown -R www-data:www-data storage</p><blockquote><p>यह केवल Linux server पर लागू होता है। अगर आप <strong>shared hosting (cPanel)</strong> पर हैं, तो वहां default permissions ही काम कर जाती हैं।</p></blockquote><h3>🧾 Example: Show Image in Blade (Live Server)</h3><p>blade</p><p>CopyEdit</p><p>&lt;img src=\"{{ asset(\'storage/posts/\' . $filename) }}\" alt=\"Post Image\"&gt;</p><blockquote><p>Ensure that the file exists in: storage/app/public/posts/</p></blockquote><h3>💡 What to Do on cPanel (Shared Hosting)</h3><p>If you\'re on cPanel and <strong>cannot run php artisan storage:link</strong>, follow these steps:</p><p>Go to File Manager</p><p>Navigate to /public_html</p><p>Create a new folder called storage</p><p>Manually <strong>copy files</strong> from storage/app/public/ to public_html/storage/</p><p>Now images will be accessible at:</p><p>🔄 You’ll need to write a small script or use Laravel Events to copy files there after upload.</p><h3>✅ Summary</h3><figure class=\"table\"><table><thead><tr><th>Task</th><th>What to Do</th></tr></thead><tbody><tr><td>Upload image</td><td>Use storeAs(..., \'public\')</td></tr><tr><td>Make image accessible</td><td>Run php artisan storage:link</td></tr><tr><td>Show image in Blade</td><td>Use asset(\'storage/posts/filename.jpg\')</td></tr><tr><td>File permissions</td><td>chmod 775 or set writable in cPanel</td></tr><tr><td>Shared hosting (cPanel)</td><td>Manually copy to /public_html/storage</td></tr></tbody></table></figure><p>&nbsp;</p><p>अगर आप चाहें तो मैं आपकी अपलोड और फेचिंग के लिए एक कंप्लीट वर्किंग कोड सेटअप भी बना सकता हूँ। बस बताइए, आपकी होस्टिंग कौन सी है — cPanel या कोई VPS (जैसे DigitalOcean)?</p><p>ruby</p><p>CopyEdit</p><p>https://yourdomain.com/storage/posts/filename.jpg</p>', 19, 'posts/live-server-issues.jpg', 1, '2025-02-20 16:32:00', 'ouilhkb,m oh;b.outgjkb,m glb.m ;ojlm. kp\';mp[\'l][l\'?i[\'p;/,.[ip;/.;/.', 'o;lhkjmvbn o;hkbm ;oj.n', 1, NULL, '2025-07-20 13:20:13', '2025-08-09 12:54:10'),
(6, 'live server issues with laravel', 'live-server-issues-with-laravel', 4, 1, '<p>बहुत बढ़िया सवाल! जब आप अपनी Laravel वेबसाइट को <strong>live server</strong> (जैसे: cPanel, DigitalOcean, AWS, etc.) पर होस्ट करते हैं, तो आपको <strong>image upload और fetch</strong> के लिए कुछ जरूरी चीज़ों का ध्यान रखना होता है।</p><h3>✅ Step-by-step Guide for Live Server:</h3><h3>🔹 1. 📤 <strong>Image Upload Logic (same as local)</strong></h3><p>कोड वही रहेगा जो आपने अभी तक लिखा है — जैसे:</p><p>php</p><p>CopyEdit</p><p>$file-&gt;storeAs(\'posts\', $filename, \'public\');</p><blockquote><p>यह इमेज को storage/app/public/posts/ में सेव करेगा।</p></blockquote><h3>🔹 2. 🧭 <strong>Make sure /storage link exists</strong></h3><p>Live server पर आपको एक बार यह कमांड चलानी होती है:</p><p>bash</p><p>CopyEdit</p><p>php artisan storage:link&nbsp;</p><p>🔸 इससे Laravel एक symbolic link बनाएगा:</p><p>From: public/storage</p><p>To: storage/app/public</p><p>✅ अब आपकी images इस तरह accessible होंगी:</p><p>ruby</p><p>CopyEdit</p><p>https://yourdomain.com/storage/posts/image.jpg</p><blockquote><p>अगर आप cPanel यूज़ कर रहे हैं और SSH access नहीं है, तो आप symbolic link manually भी बना सकते हैं — मैं नीचे बताऊंगा कैसे।</p></blockquote><h3>🔹 3. 📁 <strong>Set Correct File Permissions</strong></h3><p>Live server पर Laravel को <strong>write access</strong> चाहिए:</p><p>storage/ और bootstrap/cache/ फोल्डर पर <strong>write permission</strong> दें:</p><p>bash</p><p>CopyEdit</p><p>chmod -R 775 storage chmod -R 775 bootstrap/cache</p><p>या कुछ server पर:</p><p>bash</p><p>CopyEdit</p><p>chown -R www-data:www-data storage</p><blockquote><p>यह केवल Linux server पर लागू होता है। अगर आप <strong>shared hosting (cPanel)</strong> पर हैं, तो वहां default permissions ही काम कर जाती हैं।</p></blockquote><h2>🧾 Example: Show Image in Blade (Live Server)</h2><p>blade</p><p>CopyEdit</p><p>&lt;img src=\"{{ asset(\'storage/posts/\' . $filename) }}\" alt=\"Post Image\"&gt;</p><blockquote><p>Ensure that the file exists in: storage/app/public/posts/</p></blockquote><h2>💡 What to Do on cPanel (Shared Hosting)</h2><p>If you\'re on cPanel and <strong>cannot run php artisan storage:link</strong>, follow these steps:</p><p>Go to File Manager</p><p>Navigate to /public_html</p><p>Create a new folder called storage</p><p>Manually <strong>copy files</strong> from storage/app/public/ to public_html/storage/</p><p>Now images will be accessible at:</p><p>🔄 You’ll need to write a small script or use Laravel Events to copy files there after upload.</p><h2>✅ Summary</h2><figure class=\"table\"><table><thead><tr><th>Task</th><th>What to Do</th></tr></thead><tbody><tr><td>Upload image</td><td>Use storeAs(..., \'public\')</td></tr><tr><td>Make image accessible</td><td>Run php artisan storage:link</td></tr><tr><td>Show image in Blade</td><td>Use asset(\'storage/posts/filename.jpg\')</td></tr><tr><td>File permissions</td><td>chmod 775 or set writable in cPanel</td></tr><tr><td>Shared hosting (cPanel)</td><td>Manually copy to /public_html/storage</td></tr></tbody></table></figure><p>&nbsp;</p><p>अगर आप चाहें तो मैं आपकी अपलोड और फेचिंग के लिए एक कंप्लीट वर्किंग कोड सेटअप भी बना सकता हूँ। बस बताइए, आपकी होस्टिंग कौन सी है — cPanel या कोई VPS (जैसे DigitalOcean)?</p><p>ruby</p><p>CopyEdit</p><p>https://yourdomain.com/storage/posts/filename.jpg</p>', 13, 'posts/live server issues with laravel.JPG', 1, '2025-02-20 16:32:00', 'ouilhkb,m oh;b.outgjkb,m glb.m ;ojlm. kp\';mp[\'l][l\'?i[\'p;/,.[ip;/.;/.', 'o;lhkjmvbn o;hkbm ;oj.n', 1, NULL, '2025-07-20 13:21:24', '2025-08-09 12:50:35'),
(7, 'The Rise of Young Athletes: Gen Z is Changing the Game', 'the-rise-of-young-athletes-gen-z-is-changing-the-game', 3, 1, '<p>The sports world is no longer dominated by seasoned veterans alone. A new generation of athletes, born in the 2000s, is rewriting records, reshaping fan expectations, and redefining what it means to be a pro.</p><p><strong>Body:</strong><br>From <strong>Coco Gauff</strong> in tennis to <strong>Jude Bellingham</strong> in football, Gen Z athletes are bursting onto the scene with remarkable confidence, skill, and digital savvy. Unlike earlier generations, these athletes are not just competitors — they’re brands, influencers, and advocates.</p><p>What’s driving this shift? Advanced training methods, social media exposure from a young age, and better access to global platforms have created an environment where talent rises faster than ever before.</p><p>But with early fame comes early pressure. Mental health, burnout, and online scrutiny are new hurdles that Gen Z athletes face daily. Fortunately, many are also leading the charge in speaking out about these issues.</p><p><strong>Conclusion:</strong><br>The future of sports is here — and it’s fast, fearless, and fiercely digital. As fans, we’re not just watching history unfold. We’re watching it stream live.</p>', 2, 'posts/the-rise-of-young-athletes-gen-z-is-changing-the-game.jpg', 1, '2025-07-23 12:33:00', NULL, NULL, 0, NULL, '2025-07-23 07:05:24', '2025-08-09 11:34:35'),
(8, 'Why Underdog Stories Are Still the Best Part of Sports', 'why-underdog-stories-are-still-the-best-part-of-sports', 3, 1, '<p>Whether it’s a 16-seed upsetting a 1-seed in March Madness or a wildcard team making it to the finals, underdog stories never fail to capture hearts. But what is it about them that keeps us coming back?</p><p><strong>Body:</strong><br>Sports are full of Goliaths — superstar athletes, powerhouse franchises, and dynasties. But every once in a while, David steps up and does something magical. From <strong>Leicester City’s 2016 Premier League win</strong> to <strong>Rulon Gardner’s Olympic wrestling shocker</strong>, underdog victories remind us that anything is possible.</p><p>These stories inspire because they tap into something deeply human: resilience, hope, and the idea that effort can beat expectation. Fans find themselves emotionally invested in these teams or athletes, even if they had never heard of them before.</p><p>Social media amplifies these moments like never before. A buzzer-beater or a last-minute goal now lives forever — shared, reposted, and celebrated by millions.</p><p><strong>Conclusion:</strong><br>In a world where odds often feel stacked, sports remind us that even the least likely contender can become a legend. And that’s a narrative worth watching — every time.</p>', 5, 'posts/why-underdog-stories-are-still-the-best-part-of-sports.jpg', 1, '2025-07-23 12:37:00', NULL, NULL, 1, NULL, '2025-07-23 07:06:21', '2025-08-09 10:37:45'),
(9, 'Why Hollywood\'s Obsession with Reboots Isn’t Going Away', 'why-hollywoods-obsession-with-reboots-isnt-going-away', 6, 1, '<p>From <i>Friends</i> reunions to <i>The Lion King</i> remakes, Hollywood’s love for reboots is stronger than ever. But is this nostalgia-powered trend a creative revival, or a sign of running out of ideas?</p><p><strong>Body:</strong><br>Reboots tap into one thing Hollywood knows fans crave: <strong>familiarity</strong>. Studios are banking on the emotional connection people have with classic shows and movies to drive views and box office numbers.</p><p>Shows like <i>Gossip Girl</i> and <i>Dexter</i> have come back with modern twists, trying to appeal to both loyal fans and younger audiences. And while some reboots (<i>Top Gun: Maverick</i>) become massive hits, others flop hard — proving that not every classic needs a comeback.</p><p>Critics argue that this reboot culture risks sidelining original stories and emerging talent. But audiences keep watching, which means the trend isn’t going anywhere soon.</p><p><strong>Conclusion:</strong><br>Love them or hate them, reboots are here to stay. The real question is: will the next reboot honor the original — or rewrite it entirely?</p>', 0, 'posts/why-hollywoods-obsession-with-reboots-isnt-going-away.jpg', 1, '2025-07-23 12:38:00', NULL, NULL, 0, NULL, '2025-07-23 07:09:28', '2025-07-23 07:09:28'),
(10, '5 Binge-Worthy Shows You Might’ve Missed in 2025', '5-binge-worthy-shows-you-mightve-missed-in-2025', 3, 1, '<p>With so many streaming platforms and weekly releases, it\'s easy to miss gems buried under blockbuster noise. Here are 5 underrated shows from 2025 you need to binge ASAP.</p><p><strong>Body:</strong></p><p><strong>\"Ghost Signal\" (Apple TV+)</strong><br>A sci-fi thriller that blends space exploration with deep emotional storytelling. Think <i>Interstellar</i> meets <i>The OA</i>.</p><p><strong>\"Queens of Crime\" (Netflix)</strong><br>A gritty British drama about a female-led heist crew pulling off high-stakes robberies across Europe. Sharp dialogue, slick editing.</p><p><strong>\"Second Sun\" (Amazon Prime)</strong><br>A dystopian mystery set in a world with two suns — one fake. Visually stunning and thought-provoking.</p><p><strong>\"Toast &amp; Trouble\" (Hulu)</strong><br>A lighthearted dramedy following two burnt-out food critics who become accidental detectives. Witty and surprisingly heartfelt.</p><p><strong>\"Echo Chamber\" (Max)</strong><br>A psychological series exploring the dark side of AI and social media manipulation. Creepy, relevant, and highly addictive.</p><p><strong>Conclusion:</strong><br>Whether you\'re into mind-bending thrillers or cozy mysteries, 2025 has delivered something for everyone — you just have to dig a little deeper to find the gold.</p>', 5, 'posts/5-binge-worthy-shows-you-mightve-missed-in-2025.jpg', 1, '2025-07-23 12:38:00', NULL, NULL, 0, NULL, '2025-07-23 07:10:12', '2025-08-09 13:10:30'),
(11, 'Why 2025 Is the Year of the Solo Entrepreneur', 'why-2025-is-the-year-of-the-solo-entrepreneur', 5, 1, '<p>The business world is witnessing a silent revolution — the rise of solo entrepreneurs, or “solopreneurs.” In 2025, this movement isn’t just a side hustle trend; it’s becoming the backbone of a new, agile economy.</p><p><strong>Body:</strong><br>Thanks to AI tools, no-code platforms, and global gig networks, one person can now do what once required a team. From launching e-commerce stores to running consulting services, solopreneurs are leveraging tech to scale fast and stay lean.</p><p>Even more compelling? Many are prioritizing freedom over funding. Instead of chasing venture capital, they’re chasing lifestyle design — running profitable, sustainable microbusinesses without the stress of managing teams or pitching to investors.</p><p>Challenges still exist: marketing saturation, burnout, and the pressure of doing everything alone. But platforms like Substack, Shopify, and Notion are offering new ways to build efficient workflows and connect with customers.</p><p><strong>Conclusion:</strong><br>Solo doesn’t mean small — it means streamlined. In 2025, being a business of one might just be the smartest move of all.</p>', 4, 'posts/why-2025-is-the-year-of-the-solo-entrepreneur.jpg', 1, '2025-07-23 12:45:00', NULL, NULL, 0, NULL, '2025-07-23 07:17:04', '2025-07-24 12:56:35'),
(12, '3 AI Trends Reshaping Business in 2025', '3-ai-trends-reshaping-business-in-2025', 3, 1, '<p>AI has evolved from a buzzword to a boardroom essential. In 2025, the smartest companies aren’t just using AI — they’re building their operations around it. Here are three AI trends every business leader should be watching.</p><p><strong>Body:</strong></p><p><strong>AI-Powered Decision Making</strong><br>From supply chain optimization to HR decisions, companies are using AI to analyze vast data sets and recommend real-time strategies — with higher accuracy than traditional models.</p><p><strong>Personalized Customer Experience</strong><br>AI is taking personalization to new levels. Businesses can now deliver hyper-targeted offers, emails, and support interactions based on behavior, preferences, and predictive analytics.</p><p><strong>Synthetic Teams &amp; Co-Bots</strong><br>Virtual AI assistants (“co-bots”) are now managing emails, setting meetings, even drafting reports. They’re not replacing human teams, but enhancing productivity by automating repetitive tasks.</p><p><strong>Conclusion:</strong><br>If 2023 was about experimenting with AI, 2025 is about embedding it into every layer of business. The companies that adapt fastest will lead — the rest will play catch-up.</p>', 13, 'posts/3-ai-trends-reshaping-business-in-2025.jpg', 1, '2025-07-23 12:47:00', NULL, NULL, 0, NULL, '2025-07-23 07:19:24', '2025-08-09 11:37:08');

-- --------------------------------------------------------

--
-- Table structure for table `post_tag`
--

CREATE TABLE `post_tag` (
  `post_id` bigint(20) UNSIGNED NOT NULL,
  `tag_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `post_tag`
--

INSERT INTO `post_tag` (`post_id`, `tag_id`) VALUES
(5, 6),
(6, 3),
(6, 4),
(7, 9),
(8, 7),
(9, 8),
(10, 8),
(12, 9);

-- --------------------------------------------------------

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('QDu49qrtHILuiiIbWIvey0FBTcWgcBGdiJGiyoF1', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiMjBMbzZqR3RzMDVTTjFLRUpjOXZNYURJWVNMcXA5UkFYMFBKQW84YSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDQ6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jYXRlZ29yeS9lbnRlcnRhaW5tZW50Ijt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1754764839);

-- --------------------------------------------------------

--
-- Table structure for table `site_settings`
--

CREATE TABLE `site_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `site_title` varchar(255) DEFAULT NULL,
  `sidebar_bg_color` varchar(100) DEFAULT NULL,
  `sidebar_text_color` varchar(100) DEFAULT NULL,
  `nav_bg_color` varchar(200) DEFAULT NULL,
  `nav_text_color` varchar(200) DEFAULT NULL,
  `navtop_bg_color` varchar(200) DEFAULT NULL,
  `navtop_text_color` varchar(200) DEFAULT NULL,
  `footer_bg_color` varchar(200) DEFAULT NULL,
  `footer_text_color` varchar(200) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `address` varchar(250) DEFAULT NULL,
  `facebook` varchar(100) DEFAULT NULL,
  `linkedin` varchar(100) DEFAULT NULL,
  `twitter` varchar(100) DEFAULT NULL,
  `instagram` varchar(100) DEFAULT NULL,
  `youtube` varchar(255) DEFAULT NULL,
  `site_logo` varchar(250) DEFAULT NULL,
  `meta_keyword` longtext NOT NULL,
  `meta_description` longtext 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 `site_settings`
--

INSERT INTO `site_settings` (`id`, `site_title`, `sidebar_bg_color`, `sidebar_text_color`, `nav_bg_color`, `nav_text_color`, `navtop_bg_color`, `navtop_text_color`, `footer_bg_color`, `footer_text_color`, `email`, `phone`, `address`, `facebook`, `linkedin`, `twitter`, `instagram`, `youtube`, `site_logo`, `meta_keyword`, `meta_description`, `created_at`, `updated_at`) VALUES
(1, 'news site', '#2828f0', '#b91313', '#ff6f61', '#3b34a8', '#000000', '#000000', '#060c41', '#f9be3e', 'news@gmail.com', '123-456-7897', 'delhi', 'facebook.com', 'linkedin.com', 'twitter.com', 'instagram.com', 'https://www.youtube.com', 'https://androidwale.com//media/images/logo.png', 'gregfd,gfdgfdg,gdfgfd,gfd,gfdgfsdgf yyt utyr, ytr,y uty,u ui,uy,i yu, i,y irtet,w,try,ui,pot,rfd,', 'It looks like you\'re trying to rename the function getValidationRules so that its name better reflects the fields defined in your $fillable array. A good naming convention would be to focus on the idea of validation rules related to the fields.', '2025-03-24 15:16:05', '2025-08-09 10:22:16');

-- --------------------------------------------------------

--
-- Table structure for table `tags`
--

CREATE TABLE `tags` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `meta_keywords` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `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`, `description`, `meta_description`, `meta_keywords`, `status`, `created_at`, `updated_at`) VALUES
(1, 'dff', 'dff', NULL, NULL, NULL, 0, '2025-07-19 13:19:21', '2025-07-19 14:03:00'),
(2, 'new tag testing', 'new-tag', 'this is about tag section , re re re yt', 'this is about tag section , re re re yt', 'this,is,about,tag,section', 0, '2025-07-20 09:54:01', '2025-07-20 10:13:01'),
(3, 'new tags for testing', 'new-tags-for-testing', NULL, NULL, NULL, 1, '2025-07-20 10:03:06', '2025-07-20 10:03:06'),
(4, 'new c', 'new-c', NULL, NULL, NULL, 1, '2025-07-20 12:43:33', '2025-07-20 12:43:33'),
(5, 'Trades', 'trades', NULL, NULL, NULL, 1, '2025-07-23 07:04:40', '2025-07-23 07:04:40'),
(6, 'Technology', 'technology', NULL, NULL, NULL, 1, '2025-07-23 07:04:59', '2025-07-23 07:04:59'),
(7, 'sports', 'sports', NULL, NULL, NULL, 1, '2025-07-23 07:05:07', '2025-07-23 07:05:07'),
(8, 'entertainment', 'entertainment', NULL, NULL, NULL, 1, '2025-07-23 07:08:59', '2025-07-23 07:08:59'),
(9, 'business', 'business', NULL, NULL, NULL, 1, '2025-07-23 07:18:12', '2025-07-23 07:18:12');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `remember_token` varchar(100) 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, 'kundan', 'kundan@gmail.com', NULL, '$2y$12$5hwS9M.Pp9AGN4zkz6VI8.UQXqhNW4KQgaLa2FDxpuqv9oxciDNvu', 'zLIoYNPso6DoM34AaXlEOYQwFBWzL0iUgWXinK4e8rOnu8XVvdPWQ8E59Hnn', NULL, NULL),
(2, 'kundan', 'kundan1@gmail.com', NULL, '$2y$12$5hwS9M.Pp9AGN4zkz6VI8.UQXqhNW4KQgaLa2FDxpuqv9oxciDNvu', '4trdyfyvjbknoilhkjmvnb ', NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `categories_slug_unique` (`slug`),
  ADD KEY `categories_created_by_foreign` (`created_by`);

--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `comments_post_id_foreign` (`post_id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `media`
--
ALTER TABLE `media`
  ADD PRIMARY KEY (`id`),
  ADD KEY `media_post_id_foreign` (`post_id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `newsletters`
--
ALTER TABLE `newsletters`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pages_slug_unique` (`slug`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `posts_slug_unique` (`slug`),
  ADD KEY `posts_category_id_foreign` (`category_id`),
  ADD KEY `posts_post_by_foreign` (`post_by`);

--
-- Indexes for table `post_tag`
--
ALTER TABLE `post_tag`
  ADD PRIMARY KEY (`post_id`,`tag_id`),
  ADD KEY `post_tag_tag_id_foreign` (`tag_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `site_settings`
--
ALTER TABLE `site_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tags`
--
ALTER TABLE `tags`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tags_slug_unique` (`slug`);

--
-- 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 `categories`
--
ALTER TABLE `categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `media`
--
ALTER TABLE `media`
  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=14;

--
-- AUTO_INCREMENT for table `newsletters`
--
ALTER TABLE `newsletters`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `pages`
--
ALTER TABLE `pages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `site_settings`
--
ALTER TABLE `site_settings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tags`
--
ALTER TABLE `tags`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
  ADD CONSTRAINT `categories_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
  ADD CONSTRAINT `comments_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `media`
--
ALTER TABLE `media`
  ADD CONSTRAINT `media_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `posts`
--
ALTER TABLE `posts`
  ADD CONSTRAINT `posts_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `posts_post_by_foreign` FOREIGN KEY (`post_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `post_tag`
--
ALTER TABLE `post_tag`
  ADD CONSTRAINT `post_tag_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `post_tag_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`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 */;
