source: app/Http/Controllers/Dashboard/CompaniesController.php@ f457265

Last change on this file since f457265 was f457265, checked in by Berat Kjufliju <kufliju@…>, 4 years ago

ADD technoweek offer, companies

  • Property mode set to 100644
File size: 709 bytes
RevLine 
[f457265]1<?php
2
3namespace App\Http\Controllers\Dashboard;
4
5use App\Models\Company;
6use Illuminate\Http\Request;
7use App\Http\Controllers\Controller;
8
9class CompaniesController extends Controller
10{
11 public function index()
12 {
13 return view("dashboard.companies.index")->with([
14 "companies" => Company::all()
15 ]);
16 }
17
18 public function createAdmin($id)
19 {
20 $company = Company::findOrFail($id);
21
22 if($company->users->count()) {
23 return redirect()->route("dashboard.companies.index");
24 }
25
26 return view("dashboard.companies.create-admin")->with([
27 "company" => $company,
28 "countries" => country()->all()
29 ]);
30 }
31}
Note: See TracBrowser for help on using the repository browser.