{"id":2476,"date":"2025-07-18T09:58:55","date_gmt":"2025-07-18T09:58:55","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.in\/?p=2476"},"modified":"2025-07-18T09:58:55","modified_gmt":"2025-07-18T09:58:55","slug":"what-is-the-use-of-php-artisan-makecommand","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2025\/07\/18\/what-is-the-use-of-php-artisan-makecommand\/","title":{"rendered":"What is the use of php artisan make:command?"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">\ud83d\udd38 <strong>English:<\/strong><\/h4>\n\n\n\n<p>This command lets you create <strong>your own Artisan commands<\/strong> that can be run like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bashCopyEdit<code>php artisan your:custom-command\n<\/code><\/pre>\n\n\n\n<p>You can define logic inside these commands to run background tasks, cron jobs, data processing, reports, etc.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udd38 <strong>Hindi:<\/strong><\/h4>\n\n\n\n<p><code>php artisan make:command<\/code> \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0939\u092e <strong>\u0905\u092a\u0928\u093e \u0916\u0941\u0926 \u0915\u093e custom Artisan command<\/strong> \u092c\u0928\u093e\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0915\u0930\u0924\u0947 \u0939\u0948\u0902\u0964<br>\u091c\u0948\u0938\u0947 Laravel \u092e\u0947\u0902 <code>php artisan migrate<\/code>, \u0909\u0938\u0940 \u0924\u0930\u0939 \u0906\u092a <code>php artisan send:report<\/code> \u091c\u0948\u0938\u093e command \u092c\u0928\u093e \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u091c\u094b \u0915\u094b\u0908 \u092d\u0940 task perform \u0915\u0930\u0947 \u2014 \u091c\u0948\u0938\u0947 email \u092d\u0947\u091c\u0928\u093e, backup \u0932\u0947\u0928\u093e, \u092f\u093e background \u092e\u0947\u0902 \u0915\u094b\u0908 \u0915\u093e\u092e \u0915\u0930\u0928\u093e\u0964<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>Syntax:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">bashCopyEdit<code>php artisan make:command SendReport\n<\/code><\/pre>\n\n\n\n<p>This will create a file in:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">arduinoCopyEdit<code>app\/Console\/Commands\/SendReport.php<\/code>\n\n\u2705 Real-World Example:\n\ud83c\udfaf Use Case:\nYou want to send a daily report email to the admin from the command line or via scheduler.\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd38 English: This command lets you create your own Artisan commands that can be run&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2476"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=2476"}],"version-history":[{"count":1,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2476\/revisions"}],"predecessor-version":[{"id":2477,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2476\/revisions\/2477"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=2476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=2476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=2476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}