@extends('panel.layouts.app') @section('page-title') {{ LaraCore::setting('html_prefix') }} {{ (LaraCore::setting('html_prefix') != '') ? '|' : '' }} {{ (@$user) ? 'Edit User' : 'Add User' }} @stop @section('content')

{{ (@$user) ? 'Edit User' : 'Add User' }}

{{ Form::open( [ 'method'=> (@$user) ? 'PUT' : 'POST', 'url' => (@$user) ? route('users.update', ['user' => @$user->id ]) : route('users.store'), 'enctype' => "multipart/form-data"]) }}
{{ Form::text( 'username',@$user->username, [ 'id' => 'username', 'class' => 'form-control', ]) }} @if ($errors->has('username')) {{ $errors->first('username') }} @endif
{{ Form::text( 'email',@$user->email, [ 'id' => 'email', 'class' => 'form-control', ]) }} @if ($errors->has('email')) {{ $errors->first('email') }} @endif
@if(!@$user)
@if ($errors->has('password')) {{ $errors->first('password') }} @endif
@endif
{{ Form::select( 'role_id', @$roles, (@$user->role_id) ? @$user->role_id : '', [ 'id' => 'role_id', 'class' => 'form-control', ]) }} @if ($errors->has('role_id')) {{ $errors->first('role_id') }} @endif
@if(!@$user)
@endif
{{ Form::select( 'status', array('1'=>'Active', '0'=>'Inactive'),@$user->status, [ 'id' => 'organization_name', 'class' => 'form-control', ]) }}
{{ Form::close() }}
@stop @section('custom-scripts') @stop