public function index()
 {
     // show all
     $records = Company::with($this->related)->get();
     return $records;
 }
 public function lists()
 {
     return Company::with('user')->get();
 }
Esempio n. 3
0
 public function emails($id = null)
 {
     if (!$id) {
         $company = [];
     } else {
         $company = Company::with($this->related)->where('id', $id)->first();
     }
     return view('companies.emails', compact('company'));
 }
Esempio n. 4
0
 public function show($id)
 {
     //show single
     $record = Company::with($this->related)->findOrFail($id);
     return $record;
 }