/** * Run the database seeds. * * @return void */ public function run() { # Clear the table. Subscriber::truncate(); # Seed the table. $subscribers = [['Sbr_ImportFromID' => 4, 'Sbr_EmailAddress' => '*****@*****.**', 'Sbr_FirstName' => 'Maita', 'Sbr_LastName' => 'Elfrida', 'Sbr_Address1' => 'Perumahan Bagasasi Blok F3 No.1', 'Sbr_Address2' => 'Cibarusah', 'Sbr_Address3' => 'Cikarang Selatan', 'Sbr_CreatedOn' => Carbon\Carbon::now(), 'Sbr_CreatedBy' => 1, 'Sbr_GUID' => (string) Uuid::generate(4)]]; Subscriber::insert($subscribers); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $this->data['model'] = Subscriber::with('importFrom')->paginate(10); return $this->renderPage(); }