Modules\Doptor\CompanyInfo\Controllers\CompanyBranchController::create PHP Method

create() public method

Show the form for creating a new resource.
public create ( )
    public function create()
    {
        $country_model = $this->module_namespace . 'Models\\Country';
        $company_model = $this->module_namespace . 'Models\\Company';
        $countries = $country_model::names();
        $current_user_companies = current_user_companies();
        if ($current_user_companies) {
            $companies = $company_model::where('id', $current_user_companies)->lists('name', 'id');
        } else {
            $companies = $company_model::names();
        }
        $this->layout->title = "Add New Entry in {$this->module_name}";
        $this->layout->content = View::make("{$this->module_alias}::branches.{$this->type}.create_edit")->with('title', "Add New Entry in {$this->module_name}")->with('companies', $companies)->with('countries', $countries)->with('incharge_count', 1);
    }