/** * Run the database seeds. * * @return void */ public function run() { # Clear the table. ImportFrom::truncate(); # Seed the table. $importFrom = [['Imf_Name' => 'Old Database', 'Imf_Description' => 'Import from old database', 'Imf_CreatedOn' => Carbon\Carbon::now(), 'Imf_CreatedBy' => 1, 'Imf_GUID' => (string) Uuid::generate(4)], ['Imf_Name' => 'Excel', 'Imf_Description' => 'Import from excel', 'Imf_CreatedOn' => Carbon\Carbon::now(), 'Imf_CreatedBy' => 1, 'Imf_GUID' => (string) Uuid::generate(4)], ['Imf_Name' => 'Register', 'Imf_Description' => 'Registered subscriber', 'Imf_CreatedOn' => Carbon\Carbon::now(), 'Imf_CreatedBy' => 1, 'Imf_GUID' => (string) Uuid::generate(4)], ['Imf_Name' => 'Manual Input', 'Imf_Description' => 'Manual input subscriber registration', 'Imf_CreatedOn' => Carbon\Carbon::now(), 'Imf_CreatedBy' => 1, 'Imf_GUID' => (string) Uuid::generate(4)]]; ImportFrom::insert($importFrom); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $this->data['model'] = ImportFrom::paginate(10); return $this->renderPage(); }