Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

awrmjr's avatar

CRUD generator like Gii of Yii2

Hello!

I currently use Yii2 in my projects and I am thinking of using Laravel in a new project.

I would like to know if there is any solution for Laravel that does the same as the Giii of Yii2.

I looked at some solutions and none answered. I need something to create the CRUD (view, controller and model) files from the DB table, as Gii does.

0 likes
1 reply
jlrdw's avatar

I have also used Yii2, and never used that Gii thing. I find the keyboard is a perfect crud generator. Just me.

I did one time write my own small generator for a custom framework in VB6

Just a small segment

Private Sub Command9_Click()
Dim oldtext As String, newtext As String, tmptext As String
Dim p1 As Integer, p2 As Integer
Dim indata As String
Dim outdata As String
Text2.Value = newtext

Open "c:\accessdb\fields.txt" For Input As #1
Open "c:\accessdb\generate\edit_page.txt" For Output As #2
Do While Not EOF(1)    ' Check for end of file.
    If Not EOF(1) Then
        Line Input #1, indata    ' Read line of data.
        oldtext = indata
        Print #2, "<tr>"
        Print #2, "<td>" + oldtext + ":" + "</td>"
        Print #2, "<td>"
        Print #2, "<input type=" + Chr(34) + "text" + Chr(34) + Chr(32) + "name=" + Chr(34) + oldtext + Chr(34) + Chr(32) + "id=" + Chr(34) + oldtext + Chr(34) + Chr(32) + "value=" + Chr(34) + "<?php echo $data[" + Chr(39) + "row" + Chr(39) + "][0]->" + oldtext + ";?>" + Chr(34) + ">"
        Print #2, "</td>"
        Print #2, "</tr>"
        Print #2, vbCrLf
        Print #2, vbCrLf
        
    End If
    
Loop
Close #1
Close #2
MsgBox ("file wrote")


End Sub

But custom generator is probably one of the easiest things to program. Why even mess with someone's package.

I tried cake bake once. and to fix it the way I actually needed, the keyboard was 100 times faster.

Just my 2 cents.

P.S. Remember a generator is more for a basic crud, it is not going to give you code for a one to many through a has many poly nested many to many thing. (Just a made up relation). So you may have to still use that keyboard sometimes.

1 like

Please or to participate in this conversation.