{"id":14465,"date":"2024-09-05T11:47:25","date_gmt":"2024-09-05T11:47:25","guid":{"rendered":"https:\/\/shivlab.com\/blog\/\/"},"modified":"2024-09-05T11:47:25","modified_gmt":"2024-09-05T11:47:25","slug":"laravel-faker-random-date-generation-guide","status":"publish","type":"post","link":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/","title":{"rendered":"How to Use Laravel Faker for Random Date Generation"},"content":{"rendered":"<p>Laravel&#8217;s Faker library is a powerful tool that allows developers to generate mock data for testing purposes. One common requirement is generating random dates, which can be achieved easily using Faker. In this guide, I will walk you through the steps to integrate and use Faker to generate random dates in a Laravel project.<\/p>\n<h2><strong><span style=\"color: #ff8625;\">Step 1:<\/span> Install Laravel and Set Up a New Project<\/strong><\/h2>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14475\" src=\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Install-Laravel-and-Set-Up-a-New-Project.jpg\" alt=\"Install Laravel and Set Up a New Project\" width=\"950\" height=\"564\" srcset=\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Install-Laravel-and-Set-Up-a-New-Project.jpg 950w, http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Install-Laravel-and-Set-Up-a-New-Project-300x178.jpg 300w, http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Install-Laravel-and-Set-Up-a-New-Project-768x456.jpg 768w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/p>\n<p>If you haven&#8217;t already installed Laravel, you can do so by using Composer. Run the following command to create a new Laravel project:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\ncomposer create-project --prefer-dist laravel\/laravel faker-date-demo\r\n<\/pre>\n<p>Once the installation is complete, navigate to the project directory:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\ncd faker-date-demo\r\n<\/pre>\n<h2><strong><span style=\"color: #ff8625;\">Step 2:<\/span> Install Faker<\/strong><\/h2>\n<hr \/>\n<p>By default, Laravel includes Faker in its development dependencies. However, if you want to ensure that it\u2019s installed, you can manually add Faker by running the following command:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\ncomposer require fakerphp\/faker --dev\r\n<\/pre>\n<p>This will install the latest version of the Faker library in your project.<\/p>\n<h2><strong><span style=\"color: #ff8625;\">Step 3:<\/span> Set Up a Seeder for Date Generation<\/strong><\/h2>\n<hr \/>\n<p>Now that you have Faker installed, the next step is to set up a seeder that will generate random dates. In Laravel, seeders are used to populate your database with dummy data.<\/p>\n<p>Run the following Artisan command to create a new seeder:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nphp artisan make:seeder DateSeeder\r\n<\/pre>\n<p>Once the seeder is created, open database\/seeders\/DateSeeder.php and modify it as follows:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n\r\nnamespace Database\\Seeders;\r\n\r\nuse Illuminate\\Database\\Seeder;\r\nuse Illuminate\\Support\\Facades\\DB;\r\nuse Faker\\Factory as Faker;\r\n\r\nclass DateSeeder extends Seeder\r\n{\r\n    \/**\r\n     * Run the database seeds.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function run()\r\n    {\r\n        $faker = Faker::create();\r\n        \r\n        foreach (range(1, 10) as $index) {\r\n            DB::table(&#039;dates&#039;)-&gt;insert(&#x5B;\r\n                &#039;random_date&#039; =&gt; $faker-&gt;dateTimeBetween(&#039;-1 year&#039;, &#039;now&#039;),\r\n            ]);\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>Here, we\u2019re using $faker-&gt;dateTimeBetween(&#8216;-1 year&#8217;, &#8216;now&#8217;) to generate a random date between one year ago and today.<\/p>\n<h2><strong><span style=\"color: #ff8625;\">Step 4:<\/span> Create the Database Table<\/strong><\/h2>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14476\" src=\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Create-the-Database-Table.jpg\" alt=\"Create the Database Table\" width=\"950\" height=\"564\" srcset=\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Create-the-Database-Table.jpg 950w, http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Create-the-Database-Table-300x178.jpg 300w, http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/Create-the-Database-Table-768x456.jpg 768w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/p>\n<p>Before you can insert data, you need to create a table to hold the generated dates. You can do this by creating a migration:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nphp artisan make:migration create_dates_table\r\n<\/pre>\n<p>Open the migration file located in the database\/migrations folder and define the table schema:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n\r\nuse Illuminate\\Database\\Migrations\\Migration;\r\nuse Illuminate\\Database\\Schema\\Blueprint;\r\nuse Illuminate\\Support\\Facades\\Schema;\r\n\r\nclass CreateDatesTable extends Migration\r\n{\r\n    \/**\r\n     * Run the migrations.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function up()\r\n    {\r\n        Schema::create(&#039;dates&#039;, function (Blueprint $table) {\r\n            $table-&gt;id();\r\n            $table-&gt;dateTime(&#039;random_date&#039;);\r\n            $table-&gt;timestamps();\r\n        });\r\n    }\r\n\r\n    \/**\r\n     * Reverse the migrations.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function down()\r\n    {\r\n        Schema::dropIfExists(&#039;dates&#039;);\r\n    }\r\n}\r\n<\/pre>\n<p>This migration creates a dates table with a random_date column of the dateTime type.<\/p>\n<p>Now, run the migration to apply these changes to your database:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nphp artisan migrate\r\n<\/pre>\n<h2><strong><span style=\"color: #ff8625;\">Step 5:<\/span> Seed the Database<\/strong><\/h2>\n<hr \/>\n<p>With the database and seeder set up, you can now seed your database with random dates. Run the following command:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nphp artisan db:seed --class=DateSeeder\r\n<\/pre>\n<p>This command will populate your dates table with 10 rows, each containing a randomly generated date.<\/p>\n<h2><strong><span style=\"color: #ff8625;\">Step 6:<\/span> Verify the Generated Data<\/strong><\/h2>\n<hr \/>\n<p>To ensure everything is working correctly, you can check the contents of the dates table. If you&#8217;re using MySQL, you can run a query like this:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nSELECT * FROM dates;\r\n<\/pre>\n<p>You should see a list of 10 random dates generated within the past year.<\/p>\n<h2><strong><span style=\"color: #ff8625;\">Step 7:<\/span> Customizing the Date Range<\/strong><\/h2>\n<hr \/>\n<p>Faker allows you to generate random dates within various ranges. Here are a few examples of how you can customize the date generation:<\/p>\n<p>Specific Range: Generate a date between specific years:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$faker-&gt;dateTimeBetween(&#039;2020-01-01&#039;, &#039;2022-12-31&#039;);\r\n<\/pre>\n<p>Future Dates: Generate future dates:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$faker-&gt;dateTimeBetween(&#039;now&#039;, &#039;+1 year&#039;);\r\n<\/pre>\n<p>Past Dates: Generate past dates:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$faker-&gt;dateTimeBetween(&#039;-5 years&#039;, &#039;-1 year&#039;);\r\n\r\n<\/pre>\n<p>By modifying the date range in the dateTimeBetween() method, you can tailor the generated data to your requirements.<\/p>\n<h3><strong>Conclusion<\/strong><\/h3>\n<hr \/>\n<p>Laravel\u2019s Faker library is a simple yet effective way to generate random dates for testing. By following the steps outlined in this guide, you can easily implement random date generation in your project. Whether you need dates from the past, future, or a specific range, Faker provides a flexible solution for your development needs.<\/p>\n<p>At <a href=\"http:\/\/167.86.116.248\/shivlab\/\">Shiv Technolabs<\/a>, we specialize in delivering high-quality Laravel solutions tailored to your business needs. As a leading <a href=\"http:\/\/167.86.116.248\/shivlab\/laravel-development-company-australia\/\">Laravel development company in Australia<\/a>, our team is ready to assist you in building robust, scalable, and efficient applications. Whether you&#8217;re looking to improve your web platform or streamline development processes, we&#8217;re here to support your goals with expert Laravel services.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to generate random dates in Laravel using Faker with a step-by-step guide. This tutorial covers everything from installation to customization, making it simple to implement date generation in your Laravel projects.<\/p>\n","protected":false},"author":4,"featured_media":14474,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-14465","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use Laravel Faker for Random Date Generation<\/title>\n<meta name=\"description\" content=\"Generate random dates in Laravel using Faker. Follow this easy guide to set up and customize date generation in your Laravel project for testing and development.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Laravel Faker for Random Date Generation\" \/>\n<meta property=\"og:description\" content=\"Generate random dates in Laravel using Faker. Follow this easy guide to set up and customize date generation in your Laravel project for testing and development.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Shiv Technolabs Pvt. Ltd.\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ShivTechnolabs\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/dipen.majithiya\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-05T11:47:25+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1140\" \/>\n\t<meta property=\"og:image:height\" content=\"762\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Dipen Majithiya\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dip_majithiya\" \/>\n<meta name=\"twitter:site\" content=\"@Shiv_Technolabs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dipen Majithiya\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/\"},\"author\":{\"name\":\"Dipen Majithiya\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#\/schema\/person\/656b1fcc45a591961e3f3b061cd03206\"},\"headline\":\"How to Use Laravel Faker for Random Date Generation\",\"datePublished\":\"2024-09-05T11:47:25+00:00\",\"dateModified\":\"2024-09-05T11:47:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/\"},\"wordCount\":787,\"publisher\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#organization\"},\"image\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/\",\"url\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/\",\"name\":\"How to Use Laravel Faker for Random Date Generation\",\"isPartOf\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg\",\"datePublished\":\"2024-09-05T11:47:25+00:00\",\"dateModified\":\"2024-09-05T11:47:25+00:00\",\"description\":\"Generate random dates in Laravel using Faker. Follow this easy guide to set up and customize date generation in your Laravel project for testing and development.\",\"breadcrumb\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage\",\"url\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg\",\"contentUrl\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg\",\"width\":1140,\"height\":762,\"caption\":\"How to Use Laravel Faker for Random Date Generation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/167.86.116.248\/shivlab\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Laravel Faker for Random Date Generation\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#website\",\"url\":\"http:\/\/167.86.116.248\/shivlab\/\",\"name\":\"Shiv Technolabs Pvt. Ltd.\",\"description\":\"\",\"publisher\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/167.86.116.248\/shivlab\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#organization\",\"name\":\"Shiv Technolabs Pvt. Ltd\",\"url\":\"http:\/\/167.86.116.248\/shivlab\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/11\/stl-logo1.png\",\"contentUrl\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/11\/stl-logo1.png\",\"width\":1280,\"height\":371,\"caption\":\"Shiv Technolabs Pvt. Ltd\"},\"image\":{\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ShivTechnolabs\/\",\"https:\/\/x.com\/Shiv_Technolabs\",\"https:\/\/www.linkedin.com\/company\/shivtechnolabs\/\",\"https:\/\/www.instagram.com\/shivtechnolabs\/\",\"https:\/\/in.pinterest.com\/ShivTechnolabs\/\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#\/schema\/person\/656b1fcc45a591961e3f3b061cd03206\",\"name\":\"Dipen Majithiya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/167.86.116.248\/shivlab\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/09\/02_emp_pic-dipen-150x150.png\",\"contentUrl\":\"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/09\/02_emp_pic-dipen-150x150.png\",\"caption\":\"Dipen Majithiya\"},\"description\":\"I am a proactive chief technology officer (CTO) of Shiv Technolabs. I have 10+ years of experience in eCommerce, mobile apps, and web development in the tech industry. I am Known for my strategic insight and have mastered core technical domains. I have empowered numerous business owners with bespoke solutions, fearlessly taking calculated risks and harnessing the latest technological advancements.\",\"sameAs\":[\"http:\/\/167.86.116.248\/shivlab\/\",\"https:\/\/www.facebook.com\/dipen.majithiya\",\"https:\/\/www.linkedin.com\/in\/dipenmajithiya\/\",\"https:\/\/x.com\/dip_majithiya\"],\"url\":\"http:\/\/167.86.116.248\/shivlab\/author\/dipen_majithiya\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use Laravel Faker for Random Date Generation","description":"Generate random dates in Laravel using Faker. Follow this easy guide to set up and customize date generation in your Laravel project for testing and development.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Laravel Faker for Random Date Generation","og_description":"Generate random dates in Laravel using Faker. Follow this easy guide to set up and customize date generation in your Laravel project for testing and development.","og_url":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/","og_site_name":"Shiv Technolabs Pvt. Ltd.","article_publisher":"https:\/\/www.facebook.com\/ShivTechnolabs\/","article_author":"https:\/\/www.facebook.com\/dipen.majithiya","article_published_time":"2024-09-05T11:47:25+00:00","og_image":[{"width":1140,"height":762,"url":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg","type":"image\/jpeg"}],"author":"Dipen Majithiya","twitter_card":"summary_large_image","twitter_creator":"@dip_majithiya","twitter_site":"@Shiv_Technolabs","twitter_misc":{"Written by":"Dipen Majithiya","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#article","isPartOf":{"@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/"},"author":{"name":"Dipen Majithiya","@id":"http:\/\/167.86.116.248\/shivlab\/#\/schema\/person\/656b1fcc45a591961e3f3b061cd03206"},"headline":"How to Use Laravel Faker for Random Date Generation","datePublished":"2024-09-05T11:47:25+00:00","dateModified":"2024-09-05T11:47:25+00:00","mainEntityOfPage":{"@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/"},"wordCount":787,"publisher":{"@id":"http:\/\/167.86.116.248\/shivlab\/#organization"},"image":{"@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage"},"thumbnailUrl":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg","articleSection":["Software Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/","url":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/","name":"How to Use Laravel Faker for Random Date Generation","isPartOf":{"@id":"http:\/\/167.86.116.248\/shivlab\/#website"},"primaryImageOfPage":{"@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage"},"image":{"@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage"},"thumbnailUrl":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg","datePublished":"2024-09-05T11:47:25+00:00","dateModified":"2024-09-05T11:47:25+00:00","description":"Generate random dates in Laravel using Faker. Follow this easy guide to set up and customize date generation in your Laravel project for testing and development.","breadcrumb":{"@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#primaryimage","url":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg","contentUrl":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg","width":1140,"height":762,"caption":"How to Use Laravel Faker for Random Date Generation"},{"@type":"BreadcrumbList","@id":"http:\/\/167.86.116.248\/shivlab\/blog\/laravel-faker-random-date-generation-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/167.86.116.248\/shivlab\/"},{"@type":"ListItem","position":2,"name":"How to Use Laravel Faker for Random Date Generation"}]},{"@type":"WebSite","@id":"http:\/\/167.86.116.248\/shivlab\/#website","url":"http:\/\/167.86.116.248\/shivlab\/","name":"Shiv Technolabs Pvt. Ltd.","description":"","publisher":{"@id":"http:\/\/167.86.116.248\/shivlab\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/167.86.116.248\/shivlab\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/167.86.116.248\/shivlab\/#organization","name":"Shiv Technolabs Pvt. Ltd","url":"http:\/\/167.86.116.248\/shivlab\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/167.86.116.248\/shivlab\/#\/schema\/logo\/image\/","url":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/11\/stl-logo1.png","contentUrl":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/11\/stl-logo1.png","width":1280,"height":371,"caption":"Shiv Technolabs Pvt. Ltd"},"image":{"@id":"http:\/\/167.86.116.248\/shivlab\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ShivTechnolabs\/","https:\/\/x.com\/Shiv_Technolabs","https:\/\/www.linkedin.com\/company\/shivtechnolabs\/","https:\/\/www.instagram.com\/shivtechnolabs\/","https:\/\/in.pinterest.com\/ShivTechnolabs\/"]},{"@type":"Person","@id":"http:\/\/167.86.116.248\/shivlab\/#\/schema\/person\/656b1fcc45a591961e3f3b061cd03206","name":"Dipen Majithiya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/167.86.116.248\/shivlab\/#\/schema\/person\/image\/","url":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/09\/02_emp_pic-dipen-150x150.png","contentUrl":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2022\/09\/02_emp_pic-dipen-150x150.png","caption":"Dipen Majithiya"},"description":"I am a proactive chief technology officer (CTO) of Shiv Technolabs. I have 10+ years of experience in eCommerce, mobile apps, and web development in the tech industry. I am Known for my strategic insight and have mastered core technical domains. I have empowered numerous business owners with bespoke solutions, fearlessly taking calculated risks and harnessing the latest technological advancements.","sameAs":["http:\/\/167.86.116.248\/shivlab\/","https:\/\/www.facebook.com\/dipen.majithiya","https:\/\/www.linkedin.com\/in\/dipenmajithiya\/","https:\/\/x.com\/dip_majithiya"],"url":"http:\/\/167.86.116.248\/shivlab\/author\/dipen_majithiya\/"}]}},"jetpack_featured_media_url":"http:\/\/167.86.116.248\/shivlab\/wp-content\/uploads\/2024\/09\/How-to-Use-Laravel-Faker-for-Random-Date-Generation.jpg","_links":{"self":[{"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/posts\/14465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/comments?post=14465"}],"version-history":[{"count":4,"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/posts\/14465\/revisions"}],"predecessor-version":[{"id":14477,"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/posts\/14465\/revisions\/14477"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/media\/14474"}],"wp:attachment":[{"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/media?parent=14465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/categories?post=14465"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/167.86.116.248\/shivlab\/wp-json\/wp\/v2\/tags?post=14465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}