Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to create model into package by artisan?

    General Discussion
    2
    2
    429
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • _
      _developer_12 last edited by

      Artisan is working on root level. Please share command to create model under packages. Or other method to create it.

      1 Reply Last reply Reply Quote 0
      • A
        aayush.bhatt172 last edited by

        Hi _developer_12.

        Model artisan command will not directly work inside your package folder.
        What you can do is:

        On the root level. Create your model with the artisan command (php artisan make:model YourModel).
        Now copy your model file into (package folder -> src -> Models ).
        Now change the namespace manually by editing the file.

        Thanks and Regards
        Aayush Bhatt

        1 Reply Last reply Reply Quote 0
        • First post
          Last post