Laravel - create model controller and migration in single artisan command

0 votes

With the following command, I can build a model and resource controller that is bound to the model.

php artisan make:controller TodoController --resource --model=Todo

Is it feasible to create a migration using the aforementioned command as well?

Aug 1, 2022 in Web Development by Kithuzzz
• 38,000 points
1,275 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

If you begin with the model, you can accomplish it.

php artisan make:model Todo -mcr

If you type PHP artisan make:model —help, all the options are displayed. 

-m, --migration Create a new migration file for the model.
-c, --controller Create a new controller for the model.
-r, --resource Indicates if the generated controller should be a resource controller

I hope this helps you. 

answered Aug 2, 2022 by narikkadan
• 63,600 points

edited Mar 5

Related Questions In Web Development

0 votes
1 answer

How to create a donut with rounded edges in one direction and a white border between segments?

You can use CSS and conic-gradient for ...READ MORE

answered Dec 4, 2024 in Web Development by navya
161 views
0 votes
1 answer

What does cors means in Angularjs and what the use of it?

CORS is Cross Origin Resource Sharing which means you ...READ MORE

answered Jan 29, 2020 in Web Development by kartik
• 37,520 points
4,530 views
0 votes
0 answers

@edureka! in my nodejs as its i have used it and pug also but my css doesn't worked as while running localhost it doesn't show styling of css

<!DOCTYPE html><html></html><head><style></style>@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); *{ margin: 0; box-sizing: border-box; padding: 0; } #navbar{ background-color:black; padding: 18px ...READ MORE

Jun 11, 2020 in Web Development by anonymous
• 120 points
1,236 views
0 votes
1 answer

How to create a laravel hashed password?

Hello @kartik, Hashing A Password Using Bcrypt in Laravel: $password ...READ MORE

answered Oct 6, 2020 in Web Development by Niroj
• 82,840 points
13,715 views
0 votes
0 answers
0 votes
0 answers

jquery virtual keyboard - Curser not blinking in Chrome and Edge

I used the jQuery virtual keyboard, but ...READ MORE

Jul 26, 2022 in Web Development by gaurav
• 23,260 points
515 views
0 votes
0 answers

Artisan, creating tables in database

In Laravel 5, I'm attempting to build ...READ MORE

Jul 22, 2022 in PHP by Kithuzzz
• 38,000 points
546 views
0 votes
1 answer

Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required

Your mail.php on config you declare host ...READ MORE

answered Feb 16, 2022 in Others by Aditya
• 7,680 points
3,222 views
0 votes
1 answer

Could not open input file: artisan

chmod + artisan READ MORE

answered Aug 8, 2022 in Other DevOps Questions by anonymous

edited Mar 5 10,100 views
0 votes
0 answers

Whats the point of running Laravel with the command 'php artisan serve'?

Why do we need to run a ...READ MORE

Jun 7, 2022 in PHP by Kichu
• 19,040 points
781 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP