{"id":233,"date":"2016-07-21T05:14:32","date_gmt":"2016-07-21T05:14:32","guid":{"rendered":"http:\/\/symbioticindia.in\/docu\/?p=233"},"modified":"2016-07-21T05:38:19","modified_gmt":"2016-07-21T05:38:19","slug":"laravel-framework-terminal-commands","status":"publish","type":"post","link":"http:\/\/symbioticindia.in\/docu\/2016\/07\/21\/laravel-framework-terminal-commands\/","title":{"rendered":"Laravel Framework terminal Commands"},"content":{"rendered":"<h3 style=\"text-align: center;\">Maintenance Modes<\/h3>\n<p><strong>To enable maintenance mode, simply execute the <code class=\" language-php\">down<\/code> Artisan command:<\/strong><\/p>\n<pre class=\" language-php\"><code class=\" language-php\">php artisan down<\/code><\/pre>\n<p><strong>To disable maintenance mode, use the <code class=\" language-php\">up<\/code> command:<\/strong><\/p>\n<pre class=\" language-php\"><code class=\" language-php\">php artisan up\r\n<\/code><\/pre>\n<h3 style=\"text-align: center;\">Create New Projects<\/h3>\n<pre class=\" language-php\"><code class=\" language-php\">composer create<span class=\"token operator\">-<\/span>project laravel<span class=\"token operator\">\/<\/span>laravel {Project name} <span class=\"token string\">\"5.1.*\"<\/span><\/code><\/pre>\n<h3 style=\"text-align: center;\">Laravel Project serve to specific port\/IP (eg. localhost:8000)<\/h3>\n<pre class=\"result notranslate\">php artisan serve --host=localhost --port=8000<\/pre>\n<h3 style=\"text-align: center;\">Creating New Laravel Controler (app\/Http\/Controllers\/{controller name})<\/h3>\n<pre class=\"result notranslate\">php artisan make:controller {ControllerName}<\/pre>\n<h3 style=\"text-align: center;\">Creating New Middleware<\/h3>\n<pre class=\"result notranslate\">php artisan make:middleware &lt;middleware-name&gt;<\/pre>\n<h3 style=\"text-align: center;\">Creating New Migration (Creating DB Table skeleton ({Project}\/database\/migrations\/{filename})<\/h3>\n<pre class=\" language-php\"><code class=\" language-php\">php artisan migrate<span class=\"token punctuation\">:<\/span>make {Name_users_table}<\/code><\/pre>\n<h6>Running All Migration Files (Executing DB table to create table in DB)<\/h6>\n<pre class=\" language-php\"><code class=\" language-php\">php artisan migrate<\/code><\/pre>\n<h6>Rollback migrations<\/h6>\n<pre class=\" language-php\"><code class=\" language-php\">php artisan migrate<span class=\"token punctuation\">:<\/span>rollback<\/code><\/pre>\n<h6>Rollback all migrations<\/h6>\n<pre class=\" language-php\"><code class=\" language-php\">php artisan migrate<span class=\"token punctuation\">:<\/span>reset<\/code><\/pre>\n<h6>Rollback all migrations and run them all again<\/h6>\n<pre class=\" language-php\"><code class=\" language-php\">php artisan migrate<span class=\"token punctuation\">:<\/span>refresh\r\n\r\nphp artisan migrate<span class=\"token punctuation\">:<\/span>refresh <span class=\"token operator\">--<\/span>seed<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Maintenance Modes To enable maintenance mode, simply execute the down Artisan command: php artisan down To disable maintenance mode, use the up command: php artisan up Create New Projects composer create-project laravel\/laravel {Project name} &#8220;5.1.*&#8221; Laravel Project serve to specific port\/IP (eg. localhost:8000) php artisan serve &#8211;host=localhost &#8211;port=8000 Creating New Laravel Controler (app\/Http\/Controllers\/{controller name}) php ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"http:\/\/symbioticindia.in\/docu\/2016\/07\/21\/laravel-framework-terminal-commands\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,6],"tags":[],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-laravel","category-php"],"_links":{"self":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":4,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":237,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/233\/revisions\/237"}],"wp:attachment":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}