KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/flavourapps.com/leads/leads/app/Exports/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/flavourapps.com/leads/leads/app/Exports/RestaurantExport.php
<?php

namespace App\Exports;

use Illuminate\Support\Facades\DB;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\FromCollection;
use Illuminate\Support\Facades\Session;
use App\Models\{
	Restaurant
};

class RestaurantExport implements FromCollection, WithHeadings
{
	/**
	 * @return \Illuminate\Support\Collection
	 */
   
    
	public function collection()
	{
        
        //return $admin_id;
		$query = Restaurant::orderBy('created_at', 'DESC');
        //$query->where('type','=','user');
		
		
		return $query->get(
			[   
                "restaurant_name",
                "restaurant_type",
                "address",
                "city",
                "district",
                "state",
                "zip",
                "country",
                "contact_number",
                "mobile",
                "other_mobile",
                "manager_name",
                "manager_mobile",
                "manager_email",
                "owner_name",
                "owner_mobile",
                "owner_email",
                "no_of_branches",
                "software_available",
                "software_name",
                "notes"
            ]);
           

	}

	public function headings(): array
	{
		return [
                "restaurant_name",
                "restaurant_type",
                "address",
                "city",
                "district",
                "state",
                "zip",
                "country",
                "contact_number",
                "mobile",
                "other_mobile",
                "manager_name",
                "manager_mobile",
                "manager_email",
                "owner_name",
                "owner_mobile",
                "owner_email",
                "no_of_branches",
                "software_available",
                "software_name",
                "notes"
		];
	}
}

Anon7 - 2021