コード例 #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('role_user')->truncate();
     // Making an admin user
     $user = App\User::where('name', '=', 'Manish Dwibedy')->first();
     $admin = App\Role::where('name', '=', 'admin')->first();
     // role attach alias
     $user->attachRole($admin);
     // parameter can be an Role object, array, or id
     // Making a manager user
     $user = App\User::where('name', '=', 'manager')->first();
     $manager = App\Role::where('name', '=', 'manager')->first();
     // role attach alias
     $user->attachRole($manager);
     // parameter can be an Role object, array, or id
     // Making a supervisor user
     $user = App\User::where('name', '=', 'supervisor')->first();
     $supervisor = App\Role::where('name', '=', 'supervisor')->first();
     // role attach alias
     $user->attachRole($supervisor);
     // parameter can be an Role object, array, or id
     // Making a caller user
     $user = App\User::where('name', '=', 'caller')->first();
     $caller = App\Role::where('name', '=', 'caller')->first();
     // role attach alias
     $user->attachRole($caller);
     // parameter can be an Role object, array, or id
     // Making a caller user
     $user = App\User::where('name', '=', 'caller2')->first();
     $caller = App\Role::where('name', '=', 'caller')->first();
     // role attach alias
     $user->attachRole($caller);
     // parameter can be an Role object, array, or id
 }
コード例 #2
0
ファイル: ExampleTest.php プロジェクト: acidron/reactjs_demo
 public function testSignupUser()
 {
     $response = $this->call('POST', 'auth/register', ['firstname' => 'John', 'lastname' => 'Appleseed', 'email' => '*****@*****.**', 'password' => 'testpass', 'password_confirmation' => 'testpass']);
     $user = App\User::where('email', '=', '*****@*****.**')->first();
     $this->assertEquals('John', $user->firstname);
     $this->assertEquals('Appleseed', $user->lastname);
 }
コード例 #3
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::table('users', function (Blueprint $table) {
         $table->tinyInteger('edit')->default(0);
     });
     App\User::where('id', 'LIKE', 1)->update(['edit' => 1]);
 }
コード例 #4
0
 public function testUserHaveNotPermissionButIsAdmin()
 {
     $user = App\User::where('email', '*****@*****.**')->first();
     Auth::login($user);
     $res = $this->call('POST', '/posts');
     $this->assertEquals(200, $res->getStatusCode());
 }
コード例 #5
0
ファイル: ProfilesTableSeeder.php プロジェクト: valdinei/rest
 public function run()
 {
     $faker = $this->beginSeeding(new App\Profile());
     $me = factory(\App\Profile::class, 'me')->create();
     $users = App\User::where('email', '!=', '*****@*****.**')->get();
     foreach ($users as $user) {
         $user->profile()->create(['bio' => $faker->paragraph(), 'slack' => $faker->userName, 'hipchat' => $faker->userName]);
     }
     $this->endSeeding();
 }
コード例 #6
0
ファイル: SocialsTableSeeder.php プロジェクト: valdinei/rest
 public function run()
 {
     $faker = $this->beginSeeding(new App\Social());
     $me = factory(\App\Social::class, 'me')->create();
     $users = App\User::where('email', '!=', '*****@*****.**')->get();
     foreach ($users as $user) {
         $user->socials()->create(['provider' => $faker->randomElement(config('settings.social') + [null]), 'provider_id' => $faker->numberBetween(5000000, 9000000), 'name' => $faker->firstName . ' ' . $faker->lastName, 'nickname' => $faker->userName, 'avatar' => $faker->url, 'email' => $faker->safeEmail]);
     }
     $this->endSeeding();
 }
コード例 #7
0
ファイル: UserTableSeeder.php プロジェクト: burflip/ddsi
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('users')->insert(['name' => 'admin', 'email' => '*****@*****.**', 'password' => bcrypt('ddsi'), 'remember_token' => str_random(10), 'created_at' => Carbon\Carbon::now(), 'updated_at' => Carbon\Carbon::now()]);
     $user = App\User::where('email', '=', '*****@*****.**')->first();
     $user->attachRole(1);
     DB::table('users')->insert(['name' => 'administrativo', 'email' => '*****@*****.**', 'password' => bcrypt('ddsi'), 'remember_token' => str_random(10), 'created_at' => Carbon\Carbon::now(), 'updated_at' => Carbon\Carbon::now()]);
     $user = App\User::where('email', '=', '*****@*****.**')->first();
     $user->attachRole(2);
     DB::table('users')->insert(['name' => 'financiero', 'email' => '*****@*****.**', 'password' => bcrypt('ddsi'), 'remember_token' => str_random(10), 'created_at' => Carbon\Carbon::now(), 'updated_at' => Carbon\Carbon::now()]);
     $user = App\User::where('email', '=', '*****@*****.**')->first();
     $user->attachRole(3);
 }
コード例 #8
0
 /**
  * Create admin user for admin panel
  */
 public function run()
 {
     $admin_name = env('ADMIN_NAME', 'admin');
     $admin_email = env('ADMIN_EMAIL', '*****@*****.**');
     $admin_password = env('ADMIN_PASSWORD', 'admin');
     $admin_url = env('ADMIN_URL', 'admin');
     App\User::where('email', '=', $admin_email)->delete();
     App\User::create(['name' => $admin_name, 'email' => $admin_email, 'password' => $admin_password]);
     $this->command->info('Admin user created!');
     $this->command->info('Name : ' . $admin_name . '');
     $this->command->info('Email : ' . $admin_email . '');
     $this->command->info('Admin available at : ' . url($admin_url) . '');
 }
コード例 #9
0
 /**
  * @group login
  * @return $this
  */
 public function testLoginExample()
 {
     $user_1 = App\User::where('email', '*****@*****.**')->first();
     if (is_null($user_1)) {
         $this->visit('http://laratest.app/register')->type('lingbo', 'name')->type('*****@*****.**', 'email')->type('123123', 'password')->type('123123', 'password_confirmation')->press('Register')->seePageIs('http://laratest.app/home');
     }
     //Start another session(login another browser)
     $response = $this->call('POST', '/login', ['email' => '*****@*****.**', 'password' => '123123']);
     $user_2 = App\User::where('email', '*****@*****.**')->first();
     var_dump($user_1->session_id);
     var_dump($user_2->session_id);
     $this->assertEquals("", Session::getHandler()->read($user_1->session_id));
     $this->assertNotEquals("", Session::getHandler()->read($user_2->session_id));
 }
コード例 #10
0
		<!-- name -->
		<div class="col-xs-6 form-group {{ $errors->has('name') ? 'has-error' : '' }}">

			{!! Form::label('name',Lang::get('lang.name')) !!}
			{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
			{!! Form::text('name',null,['class' => 'form-control']) !!}

		</div>


		<!-- team lead -->
		<div class="col-xs-6 form-group {{ $errors->has('team_lead') ? 'has-error' : '' }}">
			{!! Form::label('team_lead',Lang::get('lang.team_lead')) !!}
			{!! $errors->first('team_lead', '<spam class="help-block">:message</spam>') !!}
<?php 
$user = App\User::where('role', 'admin')->orWhere('role', 'agent')->get();
?>
			{!! Form::select('team_lead',[''=>'Select a Team Leader','Members'=>$user->lists('user_name','id')],null,['class' => 'form-control']) !!}	

		</div>

	</div>
		<!-- status -->
		<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">

			{!! Form::label('status',Lang::get('lang.status')) !!}
			{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
			<div class="row">
				<div class="col-xs-1">
					{!! Form::radio('status','1',true) !!}{{Lang::get('lang.active')}}
				</div>
コード例 #11
0
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <!-- Surrender Modal -->
    <div class="modal fade" id="surrender2">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">{!! Lang::get('lang.list_of_collaborators_of_this_ticket') !!}</h4>
                </div>
                <div class="modal-body" id="surrender22">
                    @foreach($Collaborator as $ccc)
                    <?php 
$collab_user_id = $ccc->user_id;
$collab_user = App\User::where('id', '=', $collab_user_id)->first();
?>
                    <div id="alert11" class="alert alert-dismissable" style="background-color:#F2F2F2">
                    <meta name="_token" content="{{ csrf_token() }}"/>
                        <button id="dismiss11" type="button" class="close" data-dismiss="alert" onclick="remove_collaborator({!! $ccc->id !!})" aria-hidden="true">×</button>
                        @if($collab_user->role == 'agent' || $collab_user->role == 'admin')
                            <i class="icon fa fa-user"></i>{!! $collab_user->first_name . " " . $collab_user->last_name !!}
                        @elseif($collab_user->role == 'user')
                            <i class="icon fa fa-user"></i>{!! $collab_user->user_name !!}
                        @endif
                        <div id="message-success1">{!! $collab_user->email !!}</div>
                    </div>
                    @endforeach
                </div>
               {{--  <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis6">Close</button>
コード例 #12
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     /*
      * Prepare seeding
      */
     $faker = Faker::create();
     if (config('database.default') != 'sqlite') {
         DB::statement('SET FOREIGN_KEY_CHECKS=0');
     }
     Model::unguard();
     /*
      * Seeding users table
      */
     App\User::truncate();
     factory(App\User::class)->create(['name' => 'John Doe', 'email' => '*****@*****.**', 'password' => bcrypt('password')]);
     factory(App\User::class, 9)->create();
     $this->command->info('users table seeded');
     /**
      * Seeding roles table
      */
     Bican\Roles\Models\Role::truncate();
     DB::table('role_user')->truncate();
     $adminRole = Bican\Roles\Models\Role::create(['name' => 'Admin', 'slug' => 'admin']);
     $memberRole = Bican\Roles\Models\Role::create(['name' => 'Member', 'slug' => 'member']);
     App\User::where('email', '!=', '*****@*****.**')->get()->map(function ($user) use($memberRole) {
         $user->attachRole($memberRole);
     });
     App\User::whereEmail('*****@*****.**')->get()->map(function ($user) use($adminRole) {
         $user->attachRole($adminRole);
     });
     $this->command->info('roles table seeded');
     /*
      * Seeding articles table
      */
     App\Article::truncate();
     $users = App\User::all();
     $users->each(function ($user) use($faker) {
         $user->articles()->save(factory(App\Article::class)->make());
         $user->articles()->save(factory(App\Article::class)->make());
     });
     $this->command->info('articles table seeded');
     /**
      * Seeding comments table
      */
     App\Comment::truncate();
     $articles = App\Article::all();
     $articles->each(function ($article) use($faker, $users) {
         $article->comments()->save(factory(App\Comment::class)->make(['author_id' => $faker->randomElement($users->lists('id')->toArray())]));
     });
     $this->command->info('comments table seeded');
     /*
      * Seeding tags table
      */
     App\Tag::truncate();
     DB::table('article_tag')->truncate();
     $rawTags = ['General', 'Laravel', 'Lumen', 'Eloquent', 'Servers', 'Tips', 'Lesson Feedback'];
     foreach ($rawTags as $tag) {
         App\Tag::create(['name' => $tag, 'slug' => str_slug($tag)]);
     }
     $tags = App\Tag::all();
     foreach ($articles as $article) {
         $article->tags()->attach($faker->randomElements($tags->lists('id')->toArray(), $faker->randomElement([1, 2, 3])));
     }
     $this->command->info('tags table seeded');
     /*
      * Seeding attachments table
      */
     App\Attachment::truncate();
     if (!File::isDirectory(attachment_path())) {
         File::deleteDirectory(attachment_path(), true);
     }
     $articles->each(function ($article) use($faker) {
         $article->attachments()->save(factory(App\Attachment::class)->make());
     });
     $files = App\Attachment::lists('name');
     if (!File::isDirectory(attachment_path())) {
         File::makeDirectory(attachment_path(), 777, true);
     }
     foreach ($files as $file) {
         File::put(attachment_path($file), '');
     }
     $this->command->info('attachments table seeded');
     /**
      * Close seeding
      */
     Model::reguard();
     if (config('database.default') != 'sqlite') {
         DB::statement('SET FOREIGN_KEY_CHECKS=1');
     }
 }
コード例 #13
0
ファイル: home.blade.php プロジェクト: komphet5139/ubr
							<td width="90%">
								
								<?php 
$subQs = App\Question::where('subId', $question->id)->orderBy('id')->get();
?>
								@if(count($subQs) != 0)
									@foreach($subQs as $key => $subQ)
									<div class="q-box-2">
										<div style="color: #969696; font-size: 0.9em;">ความเห็นที่ {{$postNo+1}}-{{$key+1}}</div>
										<br>
										{!!$subQ->detail!!}
										<br>
										<br>
										<div class="q-box-bottom">
											<?php 
$memberCh = App\User::where('id', $subQ->memberId)->first();
$dateCreate = strtotime($subQ->created_at);
$date = date('j/n/Y', $dateCreate);
$time = date('H:i', $dateCreate);
?>
											<table width="100%">
												<tr>
													<td>
														<table cellpadding="5" cellspacing="5"> 
															<tr>
																<td style="padding: 5px" valign="top">
																	<img class="img-post" src="/{{$memberCh->picture}}" width="30">
																</td>
																<td style="padding: 5px"  valign="top">
																		สมาชิกหมายเลข {{$memberCh->id}} | {{$memberCh->username}}
																	<br>
コード例 #14
0
    </div><!-- /.modal -->
    <!-- Ticket Assign Modal -->
    <div class="modal fade" id="{{$ticket->id}}assign">
        <div class="modal-dialog">
            <div class="modal-content">
                {!! Form::open(['id'=>'form1','method' => 'PATCH'] )!!}
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">Assign</h4>
                </div>
                <div class="modal-body">
                    <p>Whom do you want to assign ticket?</p>

                    <select id="asssign" class="form-control" name="user">
<?php 
$assign = App\User::where('role', '=', 'agent')->get();
?>
                        @foreach($assign as $user)
                        <option  value="{{$user->email}}">{{$user->user_name}}</option>
                        @endforeach
                    </select>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">Close</button>
                    <button type="submit" class="btn btn-success pull-right" id="submt2">Assign</button>
                </div>
                {!! Form::close()!!}
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <!-- Surrender Modal -->
コード例 #15
0
 public function testNewbieCanJoinOpenGroup()
 {
     $group = App\Group::where('name', 'Test group')->first();
     $user = App\User::where('email', '*****@*****.**')->first();
     $this->actingAs($user)->visit('/groups/' . $group->id . '/join')->see('Join the group')->press('Join')->see('Welcome');
 }
コード例 #16
0
<ol class="breadcrumb">

</ol>
@stop
<!-- /breadcrumbs -->
<!-- content -->
@section('content')

	
<div class="box box-primary">
<div class="box-header">
	<h2 class="box-title">{!! Lang::get('lang.staffs') !!} </h2><a href="{{route('agents.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_agent')}}</a></div>

<div class="box-body table-responsive">
<?php 
$user = App\User::where('role', '!=', 'user')->orderBy('id', 'ASC')->paginate(20);
?>
<!-- check whether success or not -->

@if(Session::has('success'))
    <div class="alert alert-success alert-dismissable">
        <i class="fa  fa-check-circle"></i>
        <b>{!! Lang::get('lang.success') !!}</b>
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        {{Session::get('success')}} 
    </div>
    @endif
    <!-- failure message -->
    @if(Session::has('fails'))
    <div class="alert alert-danger alert-dismissable">
        <i class="fa fa-ban"></i>
コード例 #17
0
if ($assigned_to == null) {
    $assigned = "Unassigned";
} else {
    $assigned = $assigned_to->first_name . " " . $assigned_to->last_name;
}
?>
                        <td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}}   </a> ({!! $count!!}) <i class="fa fa-comment"></i>
                        @if($collab > 0)&nbsp;<i class="fa fa-users"></i>@endif 
                        @if($attach > 0)&nbsp;<i class="fa fa-paperclip"></i>@endif</td>
                        <td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
                        <?php 
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();
?>
                        <td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
                        <?php 
$from = App\User::where('id', '=', $ticket->user_id)->first();
?>
 
                        @if($from->role == "user")
                <td class="mailbox-from" >{!! $from->user_name !!}</td>        
                        @else
                <td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>        
                        @endif
                <td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
                <td>{!! $assigned !!}</td>
                <td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
                </tr>
                @endforeach
                </tbody>
            </table><!-- /.table -->
            <div class="pull-right">
コード例 #18
0
					</div>
				</div>

			</div>

			<br>

			<div class="container-fluid container-fixed-lg">
				<div class="inner" style="transform: translateY(0px); opacity: 1;">

					<div class="row">
						<div class="col-lg-7 col-md-6 ">

							@if ( Session::has('error_nik') )
								<?php 
$user = App\User::where('nik', Session::get('error_nik'))->first();
?>
					    		<div class="alert alert-danger">GAGAL!!! NIK <b>{{ Session::get('error_nik') }}</b> telah terdaftar. <a href="javascript:;" data-toggle="modal" data-target="#modal-double-nik">Lihat</a></div> 
							@endif

							@if ( Session::has('success') ) 
					    		@include('app/layout/partials/alert-sukses', ['message' => session('success')])
							@endif

							@if ( Session::has('gagal') ) 
					    		@include('app/layout/partials/alert-danger', ['message' => session('gagal')])
							@endif

							@if ( count($errors) > 0 )
								@include('app/layout/partials/alert-danger', ['errors' => $errors])
							@endif
コード例 #19
0
 public function testCreateEvent()
 {
     $user = App\User::where('id', 2)->first();
     $this->actingAs($user)->withSession(['as' => 'as'])->visit('/account')->see('as');
     //$this->actingAs($user)->visit('/events/create');
 }
コード例 #20
0
                        <div class="col-md-4">
                        </div>
                        <div class="col-md-6" id="assign_loader" style="display:none;">
                            <img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}"><br/><br/><br/>
                        </div>
                    </div>
                    <div id="assign_body">
                        <p>{!! Lang::get('lang.please_select_an_user') !!}</p>
                        <select id="user" class="form-control" name="user">
<?php 
$org_heads = App\Model\helpdesk\Agent_panel\User_org::where('org_id', '=', $orgs->id)->get();
?>
                            <optgroup label="Select Organizations">
                                @foreach($org_heads as $org_head)
                                <?php 
$user_org_heads = App\User::where('id', '=', $org_head->user_id)->first();
?>
                                    <option  value="{{$user_org_heads->id}}">{!! $user_org_heads->user_name !!}</option>
                                @endforeach
                            </optgroup>
                        </select>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">{!! Lang::get('lang.close') !!}</button>
                    <button type="submit" class="btn btn-success pull-right" id="submt2">{!! Lang::get('lang.assign') !!}</button>
                </div>
                {!! Form::close()!!}
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
コード例 #21
0
ファイル: routes.php プロジェクト: udayc/travel
        Auth::login($user);
        $helper = $fb->getRedirectLoginHelper();
        $logoutUrl = $helper->getLogoutUrl($token, 'http://mfunder.testyourprojects.net/auth/logout');
        //echo $logoutUrl; exit;
        return redirect('/home')->with('logoutUrl', $logoutUrl);
    } else {
        // Register the new user or whatever.
        $user = new App\User();
        $user->name = $name;
        $user->type = 'general';
        $user->register_type = 'facebook';
        $user->username = $u_name;
        $user->email = $email;
        $user->password = bcrypt($u_name);
        $user->save();
        $user_obj = App\User::where('email', $email)->first();
        $profile = new App\Profile();
        $profile->user_id = $user_obj->id;
        //$profile = $user->profile()->save($profile);
        $profile->save();
        if (Auth::attempt($credentials)) {
            return redirect('/home')->with('message', 'Successfully logged in with Facebook');
        }
    }
});
//==============================
//==============================
Route::get('google', 'AccountController@google_redirect');
Route::get('account/google', 'AccountController@google');
Route::get('twitter', 'AccountController@twitter_redirect');
Route::get('account/twitter', 'AccountController@twitter');
コード例 #22
0
<table class="table table-default">
	<thead>
		<th>#</th>
		<th>Department</th>
		<th>Program Head</th>
	</thead>
	<tbody>
		@if(count($departments))
			@foreach($departments as $i => $department)
				<tr>
					<td>{{ $i + 1 }}</td>
					<td>{{ $department->name }}</td>
					<?php 
$name = '';
$user = App\User::where(['type' => 'programhead', 'department_id' => $department->id])->first();
if (count($user)) {
    $name = join(' ', [$user->firstname, $user->middlename, $user->lastname]);
}
?>
					<td>{{ $name}}</td>
					<td>
						<a href="/admin/department/edit/{{ $department->id }}">Edit</a>
						<a href="/admin/department/delete/{{ $department->id }}">Delete</a>
					</td>
				</tr>
			@endforeach
		@else
			<tr>
				<td colspan="4">No departments.</td>
			</tr>
コード例 #23
0
<?php

$date = Date('d-m-Y');
$format = 'Y-m-d';
$day1 = Date($format, strtotime('-1 day' . $date));
$user = App\User::where('id', '=', $user_id)->first();
$dept = App\Model\helpdesk\Agent\Department::where('name', '=', $user->primary_dpt)->first();
$created = DB::table('tickets')->select('created_at')->where('dept_id', '=', $dept->id)->where('created_at', 'LIKE', '%' . $day1 . '%')->count();
$closed = DB::table('tickets')->where('dept_id', '=', $dept->id)->where('closed_at', 'LIKE', '%' . $day1 . '%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
    $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $overdue->sla)->first();
    $ovdate = $overdue->created_at;
    $new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)) . '<br/><br/>';
    if (date('Y-m-d H:i:s') > $new_date) {
        $i++;
    }
}
// echo "created=".$created."<br/>";
// echo "closed=".$closed."<br/>";
// echo "inprogress=".$inprogress."<br/>";
// echo "overdue=".$i."<br/>";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SmoothDeal</title>
コード例 #24
0
ファイル: routes.php プロジェクト: samizares/Ndibiz-laravel
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', 'HomeController@index');
Route::get('home', 'HomeController@home');
Route::get('profile/{id}', 'HomeController@profile');
Route::post('search/business', 'HomeController@searchResult');
Route::get('testing1', function () {
    return response()->json(['name' => 'Sanjib', 'location' => 'Pluto']);
});
Route::resource('people', 'PeopleController');
Route::bind('people', function ($id) {
    return App\User::where('id', $id)->first();
});
Route::post('profile/{id}/upload', 'HomeController@userphotos');
Route::post('biz/{id}/upload', 'HomeController@bizphotos');
Route::post('bizprofile/{id}/photo', 'HomeController@bizprofilephoto');
Route::post('claimbiz/{id}', 'HomeController@claimbiz');
Route::post('profile/{id}/photo', 'HomeController@userprofilephoto');
Route::get('categories', 'HomeController@categories');
Route::get('businesses', 'HomeController@businesses');
Route::get('map', 'HomeController@map');
Route::get('locations', 'HomeController@locations');
Route::get('search-results', 'HomeController@searchResults');
Route::post('favourites', 'HomeController@favoured');
Route::delete('favourites/{biz_id}', 'HomeController@unfavoured');
Route::get('users/{userId}/favourites', 'HomeController@favourites');
//Route::get('bizreg', 'HomeController@regbiz');
コード例 #25
0
            <tr><td><b>Priority:</b></td>     	<td>{{$priority->priority}}</td></tr>
            <tr><td><b>Department:</b></td>   	<td>{{$dept->name}}</td></tr> 
            <tr><td><b>Email:</b></td>        	<td>{{$user->email}}</td></tr>
            <tr><td><b>Phone:</b></td>        	<td>{{$user->mobile}}</td></tr>
            <tr><td><b>Source:</b></td>         <td>{{$ticket_source}}</td></tr>
            <tr><td><b>Help Topic:</b></td>     <td>{{$help_topic->topic}}</td></tr>
        </table>

        <?php 
$conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get();
?>
        @foreach($conversations as $conversation)
        <br/><hr>
        <span class="time-label">
                                <?php 
$role = App\User::where('id', '=', $conversation->user_id)->first();
?>
                                <?php 
if ($conversation->is_internal) {
    ?>
                                <i class="fa fa-tag bg-purple" title="Posted by System"></i>
                                    <?php 
} else {
    if ($role->role == 'agent' || $role->role == 'admin') {
        ?>
                                    <i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
                                <?php 
    } elseif ($role->role == 'user') {
        ?>
                                    <i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
                                <?php 
コード例 #26
0
ファイル: routes.php プロジェクト: atwright147/movie-vote
*/
Route::get('/', function () {
    // $user = Socialite::driver('facebook')->user();
    // dd($user->getId());
    // $userId = $user->id;
    // return view('index')->with('userId', $userId);
    return view('index');
});
Route::get('/auth/facebook', function () {
    return Socialite::driver('facebook')->redirect();
});
Route::get('/callback/facebook', function (App\User $user) {
    // from: http://stackoverflow.com/a/30825601/633056
    $socialite = Socialite::driver('facebook')->user();
    if (App\User::where('email', '=', $socialite->email)->first()) {
        $checkUser = App\User::where('email', '=', $socialite->email)->first();
        Auth::login($checkUser);
        return redirect('/');
    }
    $user->facebook_id = $socialite->getId();
    $user->name = $socialite->getName();
    $user->email = $socialite->getEmail();
    $user->avatar = $socialite->getAvatar();
    $user->save();
    Auth::login($user);
    return redirect('/');
});
Route::get('/auth/logout', function () {
    Auth::logout();
});
/*
コード例 #27
0
ファイル: new.blade.php プロジェクト: noikiy/faveo-helpdesk
                                    </div>
                                </div>
                                <div class="col-md-3">
                                <!-- due date -->
                                    <div class="form-group">
                                        <label>{!! Lang::get('lang.due_date') !!}:</label>
                                        {{-- <input type="text" class="form-control" name="duedate" id="datemask"> --}}
                                        {!! Form::text('duedate',null,['class' => 'form-control','id'=>'datemask']) !!}
                                    </div>
                                </div>
                                <div class="col-md-3">
                                <!-- assign to -->
                                    <div class="form-group">
                                        <label>{!! Lang::get('lang.assign_to') !!}:</label>
                                            <?php 
$agents = App\User::where('role', '!=', 'user')->get();
?>

                                            {!! Form::select('assignto', ['Agents'=>$agents->lists('first_name','id')],null,['class' => 'form-control select']) !!}
                                    </div>
                                </div>
                            </div>
                            </div>
                                <!-- ticket details -->
                                <div class="form-group">
                                    <h4><b>{!! Lang::get('lang.ticket_detail') !!}<b></h4>
                                        <!-- subject -->
                                                <div class="form-group {{ $errors->has('subject') ? 'has-error' : '' }}">
                                                    <div class="row">
                                                        <div class="col-md-1">
                                                            <label>{!! Lang::get('lang.subject') !!}:</label>
コード例 #28
0
ファイル: datapost.blade.php プロジェクト: ariefsetya/it-club
<div class="panel">
    <div class="heading">
        <span class="icon">
        	<span class="mif-paper-plane mif-ani-heartbeat"></span>
        </span>
        <div class="title">{{ $data->judul }}</div>
    </div>
    <div class="content">
    <?php 
$user = App\User::where('id', $data->idpengguna)->first();
$pecah = explode("</p><p>", $data->isi);
if (sizeof($pecah) == 1) {
    echo $pecah[0];
} else {
    echo $pecah[0] . "</p><p>" . $pecah[1];
}
?>
    <a href="{{ url($data->slug) }}"><span class="place-right">See more...</span></a>
     <br>
     <br>
     <br>
     <span class="place-right"><span class="mif-calendar"></span> {{ date_format(date_create($data->created_at),"l, d M Y") }} <span class="mif-alarm"></span> {{ date_format(date_create($data->created_at),"h:i A") }} <img style="max-width:16px;max-height:16px;" src="{{ url('images/foto/'.App\User::where('id',$data->idpengguna)->first()['foto']) }}"> <a href="{{ url('people/'.$data->idpengguna) }}">{{ $user->namadepan." ".$user->namabelakang }}</a></span>
     <br>
    </div>
</div>
コード例 #29
0
    ?>
 style="color:green;" <?php 
}
?>
 >
                        <td><input type="checkbox" value="{{$ticket->id}}"/></td>
                        <?php 
$title = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$string = strip_tags($title->title);
if (strlen($string) > 40) {
    $stringCut = substr($string, 0, 40);
    $string = substr($stringCut, 0, strrpos($stringCut, ' ')) . ' ...';
}
$TicketData = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
$TicketDatarow = App\Model\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
if ($LastResponse->role == "user") {
    $rep = "#F39C12";
    $username = $LastResponse->user_name;
} else {
    $rep = "#000";
    $username = $LastResponse->first_name . " " . $LastResponse->last_name;
    if ($LastResponse->first_name == null || $LastResponse->last_name == null) {
        $username = $LastResponse->user_name;
    }
}
$titles = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
$count = count($titles);
foreach ($titles as $title) {
    $title = $title;
}
コード例 #30
0
								<table class="table table-hover demo-table-dynamic custom">
									<thead>
										<tr>
											<th width="70">
												<button class="btn btn-check" data-toggle="modal" data-target="#modal-hapus" disabled id="hapus"><i class="pg-trash"></i></button>
											</th>
											<th>Jenis Usaha</th>
											<th>Aksi</th>
										</tr>
									</thead>
									<tbody>
										@foreach($usaha as $us)
										<tr>
											<td>
											<?php 
$data_master = App\User::where('id_usaha', $us->id)->count();
?>
											<?php 
$data_master2 = App\Usaha::where('jenis_usaha', $us->id)->count();
?>

													<?php 
$title = "";
$disabled = "";
if ($data_master + $data_master2 >= 1) {
    $title = "Usaha sedang terpakai";
    $disabled = "disabled";
}
?>
												<div class="checkbox" title="<?php 
echo $title;