CodeIgniter 4(part2)

 


In this we will learn how to create database with migration

First we need create database from mysql

Activate xampp mysql then go to localhost insert your user and pass and enter the database then create database



After that go to your terminal and in your directory project type this code :
$ ~ php spark make:migration [your table name]
Then Enter
You will get notification that table have successfully created

Next you will need open the migration file with code editor and edit it


In function up you will need type the code to create table

After finished the code then go back to terminal then type this code

$ ~ php spark migrate

Then you will see the notification that table successfully migrate to your database

For next part we will learn create controller from cli















Comments

Popular posts from this blog

HTML Attributes

Bug Heroes 2