Note that there are some explanatory texts on larger screens.

plurals
  1. PODB:seed file for Laravel 4 working fine on local host, not working on Mediatemple gridserver?
    primarykey
    data
    text
    <p>I have a Laravel 4 db:seed file that I am trying to use on mediatemple gridserver. I was able to run a migration with artisan fine (php artisan migrate), and make the tables, but I am not able to seed the tables. This database seeding worked fine on local host. It is only now on a live server that I am experiencing any issues with it. Here is the seed file:</p> <pre><code>ArtistsTableSeeder.php: class ArtistsTableSeeder extends Seeder { public function run() { // Uncomment the below to wipe the table clean before populating // DB::table('artists')-&gt;delete(); $artists = array( ); $Artists = [ ['stage_name' =&gt; 'Blah', 'city' =&gt; 'Blah', 'state' =&gt; 'blah', 'video_path' =&gt; 'youtube.com', 'image_path' =&gt; 'filepickerimage', 'soundcloud_profile' =&gt; 'https://soundcloud.com/', 'description' =&gt; '', 'created_at' =&gt; new DateTime, 'updated_at' =&gt; new DateTime] ]; // Uncomment the below to run the seeder DB::table('artists')-&gt;insert($Artists); } } </code></pre> <p>It is spitting out this error:</p> <pre><code>{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"syntax error, unexpected '['","file":"\/nfs\/c09\/h04\/mnt\/139243\/domains\/crowdsets.com\/html\/app\/database\/seeds\/ArtistsTableSeeder.php","linemichaelsutyak.com@n26:/home/139243/domains/crowdsets.com/html$ php artisan db:seed </code></pre> <p>It is complaining about the line that starts the array:</p> <pre><code>$Artists = [ </code></pre> <p>I have no idea why this is happening. A little help would be appreciated. Thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload