mercredi 17 février 2016

importing Excel sheet using maatweb to Laravel 5.1

Am trying to learn how to import a basic excel sheet into laravel 5.1

vname Vservice vphone vmobile test name test service test number 123232 test mobile 12344

I've made the following function

public function ImportVlist() {

 Excel::load('/import.xlsx', function($reader)

 {


     $results = $reader->get();

     foreach ($results as $key => $value) {

         foreach ($value as $key => $value1) {



             Vlist::create([


                 'vname'=>$value1->vname,
                 'vservice' => $value1->vservice,
                 'vphone' => $value1->vphone,
                 'vmobile' => $value1->vmobile

             ]);
         }
     }

 })->get();

}

I've made a route
Route::get('/vlist/import' , 'VlistsController@ImportVlist');

and in index i've made the following link

  • Import Suppliers

but when i click i receive page not found beside the excel is not imported into mysql db



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire