Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function handle()
- {
- Log::useFiles(storage_path("/logs/iTunes_images.log"));
- Log::info('Debug');
- $shows = itunesshows::where("sitesid", "=", 26)->whereNull("image_id")->take(1000)->get();
- foreach($shows as $show){
- $x = new images();
- $x->image_data = base64_encode(file_get_contents($show->image_url));
- $x->save();
- $show->image_id = $x->id;
- $show->save();
- }
- }
Add Comment
Please, Sign In to add comment