Search code examples
phplaravellaravel-artisan

Artisan Make Not Generating Correct Templates


Having a weird problem with php artisan make:model Name -a

When I run it to make a new set of items, it returns files as expected, but none of them are the correct template. For instance, for my Model, it generates:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://ww

For the Factory I get:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>author</key>
    <string

For the Migration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>name</key>
    <string>Darcula</string>
    <key>settings</key>
    <array>
        <dict>
            <key>settings</key>
            <dict>
                <key>background</key>
                <string>#2C2C2C</string>
                <key>caret</key>
                <string>#FFFFFF</string>
                <key>foreground</key>
                <string>#E6E1DC</string>
                <key>invisibles</key>
                <string>#404040</string>
                <key>lineHighlight</key>
                <string>#333435</string>
                <key>selection</key>

And for the Controller:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>name</key>
    <string>Monokai</string>
    <key>settings</key>
    <array>
        <dict>
            <key>settings</key>
            <dict>
                <key>background</key>
                <string>#272822</string>
                <key>caret</key>
                <string>#F8F8F0</string>
                <key>foreground</key>
                <string>#F8F8F2</string>
                <key>invisibles</key>
                <string>#3B3A32</string>
                <key>lineHighlight</key>
                <string>#3E3D32</string>
                <key>selection</key>
                <string>#49483E</string>
                <key>findHighlight</key>
                <string>#FFE792</string>
                <key>findHighlightForeground</key>
                <string>#000000</string>
                <key>selectionBorder</key>
                <string>#222218</string>
                <key>activeGuide</key>
                <string>#9D550FB0</string>
                <key>misspelling</key>
                <string>#F92672</string>
                <key>bracketsForeground</key>
                <string>#F8F8F2A5</string>
                <key>bracketsOptions</key>
                <string>underline</string>
                <key>bracketContentsForeground</key>
                <string>#F8F8F2A5</string>
                <key>bracketContentsOptions</key>
                <string>underline</string>
                <key>tagsOptions</key>
                <string>stippled_underline</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>Comment</string>
            <key>scope</key>
            <string>comment</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#75715E</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>String</string>
            <key>scope</key>
            <string>string</string>
            <key>settings</key>

It looks like it's pulling the data from the theme templates for my phpStorm install, but I can't figure out why it would do that. This just started today, and I've made multiple make:model Name -a commands that have worked perfectly. I've tried running the command from the terminal in phpStorm and from the command line on my computer. I'm running Windows if that matters.

I am using git and did pull from my repo, but it said that there were no updates and it was working after my last push, so I'm really stumped on this one...


Solution

  • So I feel like a bit of a moron... I went back in and opened up phpStorm again to try and keep troubleshooting the issue (@Pavel Lint, you gave me the details I was looking for in my trouble shooting, so thank you for that!), and it's working. Not only is the artisan migrate working, but the files I made yesterday that were giving me the weird results are working as well. I figured I'd eliminated phpStorm from the equation by running the make command out of the Command Line, but I guess it wasn't the make that was the problem, it was how phpStorm was showing the code.

    So, the answer is this: Don't be a noob, restart your IDE if things are acting weird.

    I'll go find my dunce hat and sit in a corner now lol