?php namespace Database\Seeders; use Illuminate\Database\Seeder; class Fakeseeder extends Seeder

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
Why line 18 is wrong ? please help
 
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class Fakeseeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $faker =\Faker\Factory::create();
        for ($i=1; $i <= 40; $i++) {
            \App\Student::create([
                'first_name' => $this->faker->first_name(),
                'last_name' => $this->faker->last_name(),
                'phone_no' => $this->faker->phone_number(),
                'email' => $this->faker->unique()->safeEmail(),
            ]);
        }
    }
}
File
Edit Selection View
Go
Run
Terminal Help
• Fakeseeder.php - webClass - Visual Studio Co
O env
* DatabaseSeeder.php
A Fakeseeder.php 1 •
* UserFactory.php
EXPLORER
...
V WEBCLASS
database > seeders > * Fakeseeder.php > ...
v app
1
<?php
2
> Console
3
namespace Database\Seeders;
> Exceptions
4
> Http
use Illuminate\Database\Seeder;
v Models
6
* Kelas.php
7
class Fakeseeder extends Seeder
* Student.php
* User.php
8
{
9
10
* Run the database seeds.
> Providers
11
> bootstrap
12
* @return void
> config
*/
13
v database
public function run()
{
$faker =\Faker\Factory::create();
for ($i=1; $i <= 40; $i++) {
14
v factories
15
* FakeFactory.php
* UserFactory.php
> migrations
16
17
JApp\student::create([
'first_name' => $this->faker->first_name(),
'last_name' => $this->faker->last_name(),
'phone_no' => $this->faker->phone_number(),
'email' => $this->faker->unique()->safeEmail(),
]);
18
19
v seeders
* DatabaseSeeder.php
* Fakeseeder.php 1
O .gitignore
> public
20
21
22
23
24
25
> resources
26
}
v routes
27
pni phn
Transcribed Image Text:File Edit Selection View Go Run Terminal Help • Fakeseeder.php - webClass - Visual Studio Co O env * DatabaseSeeder.php A Fakeseeder.php 1 • * UserFactory.php EXPLORER ... V WEBCLASS database > seeders > * Fakeseeder.php > ... v app 1 <?php 2 > Console 3 namespace Database\Seeders; > Exceptions 4 > Http use Illuminate\Database\Seeder; v Models 6 * Kelas.php 7 class Fakeseeder extends Seeder * Student.php * User.php 8 { 9 10 * Run the database seeds. > Providers 11 > bootstrap 12 * @return void > config */ 13 v database public function run() { $faker =\Faker\Factory::create(); for ($i=1; $i <= 40; $i++) { 14 v factories 15 * FakeFactory.php * UserFactory.php > migrations 16 17 JApp\student::create([ 'first_name' => $this->faker->first_name(), 'last_name' => $this->faker->last_name(), 'phone_no' => $this->faker->phone_number(), 'email' => $this->faker->unique()->safeEmail(), ]); 18 19 v seeders * DatabaseSeeder.php * Fakeseeder.php 1 O .gitignore > public 20 21 22 23 24 25 > resources 26 } v routes 27 pni phn
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Hash Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education