Webiondev123

Experience

3,060

0 Best Reply Awards

  • Member Since 3 Months Ago
  • 5 Lessons Completed
  • 0 Favorites

21st February, 2018

Webiondev123 left a reply on Flash Session Data In Blade Without Passing From Controller • 1 day ago

I fixd it

thanks!

Webiondev123 left a reply on Flash Session Data In Blade Without Passing From Controller • 1 day ago

Session::put('count', $count);

Webiondev123 started a new conversation Give Message Counts In Navbar • 1 day ago

I have my nav included in the main layout. However there is no route for nav....In nav there is a message content which I want it to show total new messages..How can I do this? I read the view composers but it is saying there needs to be a route to the view but I do not have route to nav..its embedded in main layout...What can I do?

Webiondev123 left a reply on Strange Insert Error..Integrity Constraint Violation • 1 day ago

@austenc putting all in one array works!

Webiondev123 started a new conversation Strange Insert Error..Integrity Constraint Violation • 1 day ago

Ok, whenever I am trying to insert column 'to_' using eloquent it gives me error integrity constraint violation but when I insert using DB::table it inserts..why?


function insertThis($id){
   //DB::table('message')->insert(array('from' => auth()->user()->id,'to_'=>$id,)); //ok

   //$message->fill(['from'=>auth()->user()->id],
    //       ['to_'=>$id]); //not_ok
}



```

20th February, 2018

Webiondev123 started a new conversation Use Function Parameter In Join Closure • 2 days ago

I need to use $id inside but saying undefined

public function xxxx($id){

        $data=DB::table('users')
        ->join('need', function($join)
        {   
            $join->on('users.id', '=', 'need.user_id')
                 ->where('need.id', '=', $id);<-----------------
        })
        ->get();

}

Webiondev123 started a new conversation Bcrypt Giving Different Value When User Changes Password • 2 days ago

my app creates user by laravel's default authentication and hashes the password using default encryption function but when I try to change password it gives different hash and I cannot log in again...i am guessing default encryption is by bcrypt


'AES-256-CBC'

 
            if(DB::table('users')->where('id', '=', auth()->user()->id)
    ->update('password' => bcrypt($validated['password']))){
                   $user=User::find(auth()->user()->id); 
                  return view('profile')->with('user', $user);
              }
          

Webiondev123 started a new conversation Give Notification To User When Integrity Constraint Violeted • 2 days ago

I want to give user notification for integrity violation.

But it is just sending me to a blank white page

 try {
            if(DB::table('users')->where('id', '=', auth()->user()->id)
    ->update(array('name' => $validated['name'],'email' => $validated['email'],'password' => bcrypt($validated['password']),'city' => $validated['city'],'country' => $validated['country'],'occupation' => $validated['occupation'],
     'file' => $file->file))){
                   $user=User::find(auth()->user()->id); 
                  return view('profile_me')->with('user', $user);
              }
          }

        catch (\Illuminate\Database\QueryException $e) {
            
           $notification = array(
            'message' => 'Email already exists!', 
            'alert-type' => 'error'
        );  

           Redirect::to('profile_me')->with($notification);

}

Webiondev123 started a new conversation MethodNotAllowed Exception • 2 days ago

//load this view with form action post
Route::get('/editthis/{data}', '[email protected]')->name('editthis'); 

//send data to this controller to update database

Route::post('/update', '[email protected]')->name('update');

It is giving me that error

19th February, 2018

Webiondev123 left a reply on Stuck In Uploading Image By Intervention • 3 days ago

@Snapey

 protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => 'required|string|max:255',
            'email' => 'required|string|email|max:255|unique:users',
            'password' => 'required|string|min:6|confirmed',
            'city'=>'required|string|max:255',
            'country'=>'required|string|max:255',
            'type'=>'required',
            'occupation'=>'required|string|max:255',
            'file' => 'required | image',

        ]);
    }

    /**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return \App\User
     */

    public function uploadfile(){

        
          $request= Req::capture();  // This gives you the current 

         //    //get file
         //    $file =  $request->file('file')->store("public"); 
          
         //    return $file;

         $file =$request->file('file');      
    
            $filename = time() . '.' . $file->getClientOriginalExtension();
                $location = public_path('img/'. $filename);
                $file=Image::make($file)->resize(128,128)->save($location);

                $file->file = $filename;
                //$file->save();  
                return $file;
        }
 
    protected function create(array $data)
    {
        $file=$this->uploadfile();
        
        
        //$file=explode("/", $file);
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'city'=> $data['city'],
            'country'=>$data['country'],
            'type'=>$data['type'],
            'occupation'=>$data['occupation'],
            'file'=>$file,
            
        ]);
    }


```

17th February, 2018

Webiondev123 left a reply on Stuck In Uploading Image By Intervention • 5 days ago

@splendidkeen It saves but when I try to read it outputs garbage

src="{{ auth()->user()->file}} //I want to display image

var_dump(auth()->user()->file

��Y���z�=������m��ȱ��{��? ��\]�^�<]�O8a]�6�*ܔ���d�v88�k���{\ɴ~��r��#�Z��ӊ��sҷR��kf���Ó�5|�)F^��ݨ}ppF�

Webiondev123 started a new conversation How Can I Pass Parameter In Route Href={{Route('test'./$val}} To Blade View? • 5 days ago

How can I pass parameter in route href={{Route('test'./$val}}

<p><a href={{Route('test'./$val}}" class="btn btn-info btn-xs" role="button">know more</a> 

Route::get('/test/{id}', '[email protected]')->name('test');


 public function test($id){

        return view('test')->with('id', $id);

    }

Route not found

Webiondev123 left a reply on Stuck In Uploading Image By Intervention • 5 days ago

I changed the type to blob in mysql table then it works for save but I cannot read the image however and it is not being stored in laravel folder

Webiondev123 started a new conversation Stuck In Uploading Image By Intervention • 5 days ago

Unable to insert image in either using store or save. Using store says store function not available to GD...using save says not correct string value

public function uploadfile(){

        
        // $manager = new ImageManager(array('driver' => 'imagick'));
         $request= Req::capture();  // This gives you the current 

            //get file
              $file =$request->file('file');
             $file=Image::make($file)->resize(128, 128);
            // $file = $request->file('file')->store("public"); 
          
             $file= $file->save("public");  
           
            return $file;

        }

16th February, 2018

Webiondev123 started a new conversation How Can I Select And Pass The Country Name To My Route In Bootstrap-formhelper • 6 days ago

Need to pass the selected country to local on selection

 <div class="bfh-selectbox bfh-countries" data-country="US" data-flags="true">
              <input type="hidden" name="country" value="">
              <a class="bfh-selectbox-toggle" role="button" data-toggle="bfh-selectbox" href="Route{{'local'}}">
                <span class="bfh-selectbox-option input-medium" data-option=""></span>
                <b class="caret"></b>
              </a>
              <div class="bfh-selectbox-options">
                <input type="text" class="bfh-selectbox-filter">
                <div role="listbox">
                <ul role="option">
                </ul>
                </div>
              </div>
          </div>

14th February, 2018

Webiondev123 left a reply on Blade If/else Always Executing Else • 1 week ago

I did it like this

 public function func()

    {
        if(request()->is('route') and auth()->user()->type=='type')

           
            return Redirect::to('404');
   
        else

            return view('home');
    }

How can I do it in middleware and which file? One file I have middleware is RedirectIfAuthenticated.php

11th February, 2018

Webiondev123 started a new conversation Blade If/else Always Executing Else • 1 week ago

Even if the user type if different it always taking me to 404 no matter what type of user. I want 404 only for one type of user.

  @if (\Request::is('routename') and auth()->user()->type=='type') 
@section('content')             

@else


    <script type="text/javascript">
   window.location.href = "404";
</script>

 @endif

Webiondev123 started a new conversation Question On Designing Routes • 1 week ago

Say I have a login homepage where every user lands after login. Now should I use the route specific to every user like

route::get('home', [email protected]);

OR

route::get('home/{id}', [email protected]);

10th February, 2018

Webiondev123 started a new conversation Laravel Uploading A .tmp File Instead Of Image • 1 week ago

Hi.

My laravel upload is uploading this file when I try to upload image:

C:\wamp64\tmp\phpA304.tmp

$validated=$request->validate( [
            'description' => 'required|string|max:255',
            'category' => 'required',
            'deadline' => 'required|date',
            'verify'=>'required',
            'file' => 'mimes:jpeg,png,bmp,gif,svg,mp4,qt',


        ]);

           $need=new Table;
           $need->fill($validated);
           $need->fill(['user_id'=> \Auth::user()->id]);
           
           if($need->save()) {

           return Redirect::to('somewhere');

      }

Webiondev123 started a new conversation Display A One Time Popover Message When Date Selected • 1 week ago

I want to display a message to user when user clicks on date selection

8th February, 2018

Webiondev123 left a reply on Unable To Upload Image In RegisterController.php • 2 weeks ago

The image is uploaded in Storage/app/public but in database this file is uploaded

c:/xxx/xxx/php62EA.tmp

Webiondev123 left a reply on Unable To Upload Image In RegisterController.php • 2 weeks ago

I want to upload a file from form.

Webiondev123 started a new conversation Unable To Upload Image In RegisterController.php • 2 weeks ago

public function uploadfile(){

        $rules = array(
            'file' => 'required | mimes:jpeg,jpg,png | max:1000',
        );


        $request=new Request();
        $validator = Validator::make($request->all(), $rules);
            
            if ($validator->fails()) {
                return Redirect::back()
                    ->withErrors($validator)
                    ->withInput();
            }

            $file = $this->$request->file('file')->store('public');

            return $file;


    }
    protected function create(array $data)
    {

        $file=self::uploadfile();
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'city'=> $data['city'],
            'country'=>$data['country'],
            'type'=>$data['type'],
            'file'=>$data['file']
            
        ]);
    }

Uploading a file like php7AEB.tmp

Webiondev123 started a new conversation How To Echo Expression Within Expression In Blade? • 2 weeks ago

Here is my image file path

<img alt="image" class="img-circle" src="{{asset(storage/{{Auth::user()->file}})}}" />

But giving error

Parse error: syntax error, unexpected '{'

7th February, 2018

Webiondev123 started a new conversation Laravel Difference Between Image Validator And MIME Validator? • 2 weeks ago

What is the difference between using mime validator VS image validator in image validation? Is it ONLY that MIME is also used for vdo?

Thanks

6th February, 2018

Webiondev123 started a new conversation Cannot Add New Column Enum Type • 2 weeks ago

What I did

public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });

        Schema::table('users', function (Blueprint $table) {
        $table->enum('type', ['seeker','giver']);
});
    }

Then

php artisan:migrate

But shows database already updated. So what I did is

php artisan refresh:all

But it drops everything and creates new

Anyway to just modify/CRUD columns in laravel 5.5?

5th February, 2018

Webiondev123 left a reply on Mailtrap.io Expected Response Code 220 But Got Code "421", With Message "421 • 2 weeks ago

In my mailtrap.io profile there's two keys

API and JWT

Webiondev123 started a new conversation Mailtrap.io Expected Response Code 220 But Got Code "421", With Message "421 • 2 weeks ago

I set up mailtrap with yahoo email and custom password.

mail.php

return [
    'driver' => env('MAIL_DRIVER', 'smtp'),
    'host' => env('MAIL_HOST', 'smtp.mailtrap.io'),
    'port' => env('MAIL_PORT', 587),
     'from' => [
        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
        'name' => env('MAIL_FROM_NAME', 'my'),
    ],
    'encryption' => env('MAIL_ENCRYPTION', 'tsl'),
   
    'username' => env('MAIL_USERNAME'),

    'password' => env('MAIL_PASSWORD'),
    'sendmail' => '/usr/sbin/sendmail -bs',
   'markdown' => [
        'theme' => 'default',

        'paths' => [
            resource_path('views/vendor/mail'),
        ],
    ],

];

.env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=mailtrap signup password
MAIL_ENCRYPTION=tls

4th February, 2018

Webiondev123 left a reply on Error Has Not Working In Login Page • 2 weeks ago


@if (session('message'))
    <div class="alert alert-success">
        {{ session('message') }}
    </div>
@endif 

This ones working..but the error has stuff dont work. I wanted to know why. Now I am only using the session message technique

Webiondev123 started a new conversation Error Has Not Working In Login Page • 2 weeks ago

I am unable to show the error has message.

<form class="m-t" role="form" action="{{route('login')}}" method="post">
                {{ csrf_field() }}
                
                <div class="form-group">
                    <input type="email" name ="username" class="form-control" placeholder="Username" required="">

                     @if ($errors->has('email'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('email') }}</strong>
                                    </span>
                                @endif
                </div>
                <div class="form-group">
                    <input type="password" name="password" class="form-control" placeholder="Password" required="">
                      
                       @if ($errors->has('password'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                                @endif
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">Login</button>

                <a href="#"><small>Forgot password?</small></a>
                <p class="text-muted text-center"><small>Do not have an account?</small></p>
                <a class="btn btn-sm btn-white btn-block" href="{{route('register')}}">Create an account</a>
            </form>

So what I did is

<form class="m-t" role="form" action="{{route('login')}}" method="post">
                {{ csrf_field() }}
                @if (Session::has('message'))
                    <div class="alert alert-info">{{ Session::get('message') }}
                    </div>
                @endif
                <div class="form-group">
                    <input type="email" name ="username" class="form-control" placeholder="Username" required="">

                     @if ($errors->has('email'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('email') }}</strong>
                                    </span>
                                @endif
                </div>
                <div class="form-group">
                    <input type="password" name="password" class="form-control" placeholder="Password" required="">
                      
                       @if ($errors->has('password'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                                @endif
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">Login</button>

                <a href="#"><small>Forgot password?</small></a>
                <p class="text-muted text-center"><small>Do not have an account?</small></p>
                <a class="btn btn-sm btn-white btn-block" href="{{route('register')}}">Create an account</a>
            </form>

   public function login (Request $request){

        if (Auth::attempt(['name' => $request->username, 'password' => $request->password])) {

        echo "success with username!";
} 

elseif (Auth::attempt(['email'=> $request->username, 'password' => $request->password])) {

        return redirect()->route('home');
} 


else {
       // \Session::flash('message', "email/password wrong");
       //  return redirect()->route;

    return redirect('login')->with('message', 'Email/Password Wrong!');

}
    }

Webiondev123 left a reply on Logout Gives Methodnotallowedexception • 2 weeks ago

@skliche Thanks! Working..but I want to logout through a link...

Webiondev123 left a reply on Logout Gives Methodnotallowedexception • 2 weeks ago

I have this

  public function logout(Request $request)
    {
        $this->guard()->logout();

        $request->session()->invalidate();

        return redirect('/');
    }

My routes

+--------+----------+------------------------+------------------+------------------------------------------------------------------------+--------------+
| Domain | Method   | URI                    | Name             | Action                                                                 | Middleware   |
+--------+----------+------------------------+------------------+------------------------------------------------------------------------+--------------+
|        | GET|HEAD | /                      |                  | Closure                                                                | web          |
|        | GET|HEAD | api/user               |                  | Closure                                                                | api,auth:api |
|        | GET|HEAD | home                   | home             | App\Http\Controllers\[email protected]                              | web,auth     |
|        | GET|HEAD | login                  | login            | App\Http\Controllers\Auth\[email protected]                | web,guest    |
|        | POST     | login                  |                  | App\Http\Controllers\Auth\[email protected]                        | web,guest    |
|        | GET|HEAD | logout                 | logout           | App\Http\Controllers\Auth\[email protected]                       | web          |
|        | POST     | password/email         | password.email   | App\Http\Controllers\Auth\[email protected]  | web,guest    |
|        | GET|HEAD | password/reset         | password.request | App\Http\Controllers\Auth\[email protected] | web,guest    |
|        | POST     | password/reset         |                  | App\Http\Controllers\Auth\[email protected]                | web,guest    |
|        | GET|HEAD | password/reset/{token} | password.reset   | App\Http\Controllers\Auth\[email protected]        | web,guest    |
|        | GET|HEAD | register               | register         | App\Http\Controllers\Auth\[email protected]      | web,guest    |
|        | POST     | register               |                  | App\Http\Controllers\Auth\[email protected]                  | web,guest    |
+--------+----------+------------------------+------------------+------------------------------------------------------------------------+--------------+

Webiondev123 started a new conversation Logout Gives Methodnotallowedexception • 2 weeks ago

When I try to logout with post

$this->post('logout', 'Auth\[email protected]')->name('logout');

It gives me the error but when I try get it works

$this->get('logout', 'Auth\[email protected]')->name('logout');

How?

Webiondev123 started a new conversation How Does Laravel Check Login Info With Database? • 2 weeks ago

I am unable to understand where is the actual code to check login info with database info?

Webiondev123 left a reply on Why My Auth And Route Protection Not Working? • 2 weeks ago

Thanks!..Its working in a new project

3rd February, 2018

Webiondev123 left a reply on Why My Auth And Route Protection Not Working? • 2 weeks ago

Thanks. One more question. I edited my login view in auth folder but still the old view is coming.

<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>INSPINIA | Login</title>

    <link href="css/app.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="{!! asset('css/vendor.css') !!}" />
    <link rel="stylesheet" href="{!! asset('css/app.css') !!}" />

</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">IN+</h1>

            </div>
            <h3>Welcome to IN+</h3>
            <p>Perfectly designed and precisely prepared admin theme with over 50 pages with extra new web app views.
                <!--Continually expanded and constantly improved Inspinia Admin Them (IN+)-->
            </p>
            <p>Login in. To see it in action.</p>
            <form class="m-t" role="form" method="POST" action="{{ route('login') }}">
                {{ csrf_field() }}>
                <div class="form-group">
                   <input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required autofocus>

                                @if ($errors->has('email'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('email') }}</strong>
                                    </span>
                                @endif
                </div>
                <div class="form-group">
                     <input id="password" type="password" class="form-control" name="password" required>

                                @if ($errors->has('password'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                                @endif
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">Login</button>

                <a href="#"><small>Forgot password?</small></a>
                <p class="text-muted text-center"><small>Do not have an account?</small></p>
                <a class="btn btn-sm btn-white btn-block" href="/login">Create an account</a>
            </form>
            <p class="m-t"> <small>Inspinia we app framework base on Bootstrap 3 &copy; 2014</small> </p>
        </div>
    </div>

</body>

</html>



in Auth\LoginController

 public function showLoginForm()
    {
        return view('auth.login');
    }

Webiondev123 started a new conversation Why My Auth And Route Protection Not Working? • 2 weeks ago

I want to protect all my routes if user do not log in validly. However I am unable to protect my routes. So for example I can directly go to home page without redirecting to login page.

Her is my web.php

Route::get('/', '[email protected]')->name("main");
Route::group(['middleware' => ['web']], function () {
    
    Route::auth();
    Route::get('/home', '[email protected]')->name("home");
    Route::get('/c3', '[email protected]')->name("c3");

});

I am finding laravel very confusing. When I put Route::auth() shouldnt the system start by this before going to any other route? Please explain

29th December, 2017

Webiondev123 started a new conversation Multiple Loops To Read Multiple Table And Display In HTML • 1 month ago

Hi. I need to display all the values from two table in my html input. It has info about a user called recruit who has info from two multiple tables. But only interview_id and course_id i need to display all values in select menu.

Here is my php read values from database which is just before the select element:

 <?php

                                $interviewlist = $dbcon->exec("select idinterview, date_time from interview");

                               
                                                    for($i=0;$i<$interviewlist;$i++){
                                                      $interviewrow=$dbcon->data_seek($i);
                                                              


                                                    
                                                  

                            ?> 

  <?php 
                                $recruit= $dbcon->exec("select * from recruit where user_id=".quote_smart($userid));

                                                      if($recruit>0){
                                                        $recruitrow=$dbcon->data_seek($i);   

                                                      
                                                      }

                                      $recruitcourse= $dbcon->exec("select idcourse, name from course where idcourse=".quote_smart($recruitrow[course_id])); 
                                if($recruitcourse>0)
                                    $recruitcourserow=$dbcon->data_seek($i); 

                                $courselist= $dbcon->exec("select * from course");

                                                       for($i=0;$i<$courselist;$i++){
                                                          $courserow=$dbcon->data_seek($i);
                                                         

                                                      
                                                      

                            ?>

Here is my html in javascript which appears if select type is recruit which is just after the php read.

 else if( $(this).val() == 'Recruit' || $(this).val() == 'Recruit-Edit'){
         $('.new-field').remove();

          $('.new-input').append(' <div class="new-field"> <input type="hidden" name="idinterview" value="<?php echo $interviewrow[idinterview];?>"><div class="form-group" id="opt"><label class="col-sm-2 control-label">Date</label><div class="col-sm-10"><select class="form-control" id="date" name="date"><option selected disable>Choose Date</option><option><?php echo $interviewrow[date_time]; ?></option></select></div></div> <?php } ?><div class="form-group"><label class="col-sm-2 control-label">Applied For</label><div class="col-sm-10"><input name="applied" type="text" class="form-control" value="<?php echo $recruitrow[applied_for]; ?>"></div></div> <div class="form-group"><label class="col-sm-2 control-label">CV</label><div class="col-sm-10"><input accept="application/pdf" class="enable-attache" data-geometry="150x150#" data-value="[<?php echo htmlentities($recruitrow[file]); ?>]" data-uploadurl="<?php echo ATTACHE_DOMAIN; ?>/upload" data-downloadurl="<?php echo ATTACHE_DOMAIN; ?>/view" data-uuid="<?php echo $uuid; ?>" data-expiration="<?php echo $expiration; ?>" data-hmac="<?php echo hash_hmac('sha1', $uuid.$expiration, ATTACHE_SECRET); ?>" type="file" name="cv" id="cv" /></div></div><div class="form-group"><label class="col-sm-2 control-label">Phone</label><div class="col-sm-10"><input name="phone" type="text" class="form-control" value="<?php echo $recruitrow[phone]; ?>"></div></div> <div class="form-group"><label class="col-sm-2 control-label">Date Applied</label><div class="col-sm-10"><input name="datea" type="date" class="form-control" value="<?php echo $recruitrow[date_applied]; ?>"></div></div> <input type="hidden" name="idcourse" value="<?php echo $courserow[idcourse];?>"><div class="form-group" id="opt"><label class="col-sm-2 control-label">Course Enrolled (if any)</label><div class="col-sm-10"><select class="form-control" id="course" name="course"><option selected disable><?php echo $recruitcourserow[name]; ?></option><option><?php echo $courserow[name]; ?></option></select></div></div><?php } ?></div>');

2nd December, 2017

Webiondev123 started a new conversation How To Include 360 Degree View. • 2 months ago

I need to include this

<iframe src="https://www.google.com/maps/embed?pb=!1m0!4v1512198079132!6m8!1m7!1sCAoSLEFGMVFpcFAzMjFVNy1iazN4TEdyZVBhZl9qTlVyZ0JwUkZtb0NnZUw2WTNR!2m2!1d1.2802263659803!2d103.85444896597!3f285.61!4f-4.439999999999998!5f0.4000000000000002" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

my view is:

@extends('layouts.default')
@section('content') 
<body itemscope="" itemtype="http://schema.org/Restaurant" class="sub page-bar">
    <div id="wave-bg" style="transform: translate(0px, 0px);"></div>
    <div id="wave-bg2"></div>

    @include('layouts.secondary-sidenav')
    
    @if(count($slider))
        <section class="cockteaser top-slider bg1" style="background: url('/assets/img/{{$slider->image}}') no-repeat center center fixed;-webkit-background-size: cover !important;-moz-background-size: cover !important;-ms-background-size: cover !important;background-size: cover !important;">
        </section>
    @endif

    <section class="picvideo top-section">
        <div class="about-inner" style="margin-left: 8.33333333%;margin-right: 8.33333333%;">
            <div class="about-right about-block" style="background: url('/assets/img/{{$outlet->about_image}}') no-repeat;">
            </div>
            <div class="about-left">
                <h2>{{$outlet->about_header}}</h2>
                <p class="justify" style="padding-bottom:20px">{!!$outlet->about_paragraph!!}</p>
                <p class="stickertext" style="text-align: center;"><a href="/reachus/">Reach Us</a></p>
            </div>
            <br style="clear:both">
        </div>
    </section>

    @if(count($gallery))
    <section class="team" id="s3" style="margin-left: 16%;margin-right: 16%;">

        <div class="skitter skitter-large with-dots">
          <ul>
            @foreach($gallery as $indexKey => $imageGallery)
            <li>
              <a href="">
                <img src="/assets/img/{{$imageGallery->image}}" class="" />
              </a>
            </li>
            @endforeach

          </ul>
        </div>

    </section>
    @endif

    @if(count($outlet->slide1_image))
    <section class="cockteaser bg1 bg2" style="background: url('/assets/img/{{$outlet->slide1_image}}') no-repeat center center fixed;-webkit-background-size: cover !important;-moz-background-size: cover !important;-ms-background-size: cover !important; background-size: cover !important;">
    </section>
    @endif @if($outlet->menu_id)
 
    @if(count($menuImages))
    <section class="cocktails" style="margin-top:50px">
        <div class="cocktails-inner col-md-8 double-margin">
            @foreach($menuImages as $menuItem)
            <div class="cocktails-content">
                <img alt="Menu Image" src="/assets/img/{{$menuItem->image}}" width="380" height="569">
            </div>
            @endforeach
            <br style="clear:both"> </div>
    </section>
    @endif

    <section class="text" id="s1">
        <div class="text-inner double-margin">
            <div class="text-content">
                <h2 style="font-size: 15px !important;">Discover our menu</h2>
                <p class="justify">{!!$menu->description!!}</p>

                <div class="menu-buttons">
                    @if(count($menu->menu_file))
                        <a href="/assets/img/{{$menu->menu_file}}" download>Lunch Menu&nbsp;→</a>
                    @endif 

                    @if(count($menu->menu_file2))
                        <a href="/assets/img/{{$menu->menu_file2}}" download>Full Menu&nbsp;→</a>
                    @endif 
                </div>
            </div>
        </div>
    </section>

    @endif 

    @if(count($promotions))
    <section id="s3" style="margin-left: 16%;margin-right: 16%;">

        <div class="skitter skitter-large with-dots">
          <ul>
           
            @foreach($promotions as $promotion)
            <li>
              <a href="">
                <img src="/assets/img/{{$promotion->image}}" class="swapBarsBack" />
              </a>
            </li>
            @endforeach
            
          </ul>
        </div>

    </section>
    @endif

    <section class="text">
        <div class="text-inner">
            <div class="text-content">
                <h2 style="font-size: 15px !important;">location and operating hours</h2>
                <p>{{$outlet->contact_number}}
                    <br>
                    <br> {!!$outlet->address!!}
                </p>
                <p style="margin: 30px 0;">
                    {!!$outlet->hours!!}
                </p>
            </div>
        </div>
    </section>

    </article>


    
    <script type="text/javascript">

    function initMap() {

        var coords = {

            lat: <?php echo $outlet->gmap_lat ?>,
            lng: <?php echo $outlet->gmap_long?>

        };
        var mapOptions = {

            zoom: 17,
            disableDefaultUI: true,
            scrollwheel: false,
            navigationControl: false,
            mapTypeControl: false,
            scaleControl: false,

            center: coords
        };

        var mapElement = document.getElementById('map');
        var map = new google.maps.Map(mapElement, mapOptions);

        var styles = [{
            stylers: [{
                hue: "#AB9153"
            }, {
                saturation: -100
            }, {
                invert_lightness: true
            }, {
                lightness: 25
            }, {
                gamma: 0.5
            }]
        }, {
            featureType: "road",
            elementType: "geometry",
            stylers: [{
                lightness: 0
            }, {
                visibility: "simplified"
            }]
        }, {
            featureType: "road",
            elementType: "labels",
            stylers: [{
                visibility: "on"
            }]
        }, {
            featureType: "poi.business",
            elementType: "labels",
            stylers: [{
                visibility: "off"
            }]
        }];


        map.setOptions({
            styles: styles
        });

        var marker = new google.maps.Marker({
            position: coords,
            map: map,
            icon: '/assets/img/marker.png',
        });
    }
    </script>
    <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCm4W959v77nDCo7nW6tbt9dta0xlvcauk&callback=initMap">
    </script>
    <section class="gallery1" id="section-2">
        <div class="gallery-container1 show-in-view in-view e-load e-scroll">
            <div class="gallery1 type-slideshow clearfix">
                <div class="image-container has-caption">
                    <div class="image">
                        <div id="map" class="gallery-picture-map">
                        
                        </div>
                    </div>
                    <span class="caption h3"></span>
                </div>
            </div>
        </div>
    </section>



@stop

@section('scripts')

<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="/js/jquery.easing.1.3.js"></script>
<script src="/js/jquery.skitter.min.js"></script>

<script type="text/javascript">

$(document).ready(function(){

    $(function() {
      $('.skitter-large').skitter({
        dots: false,
        fullscreen: false,
        animation: 'fade', //block //cubeShow
        interval: 3000,
        velocity: 0.3,
        navigation: true,
      });
    });

    $(function() {
      $('.skitter-large-promotions').skitter({
        dots: true,
        ullscreen: false,
        animation: 'fade', //block //cubeShow
        interval: 3000,
        velocity: 0.3
      });
    });

});

</script>

@stop

I want to delete the map and include ifram 360. But it is not working if I include that iframe

1st December, 2017

Webiondev123 started a new conversation Why Is Laravel Not Running In Wamp? • 2 months ago

Hi.

I have imported everything in my project folder www. The site runs but does not load any images saying they are missing in the assets folder. So, how can I run the app in wamp localhost without running serve?

28th November, 2017

Webiondev123 started a new conversation Uploading From Local To Live Through Filezilla • 2 months ago

Ok, I have angularjs and laravel in my app now I am uploading it to live which already has the same app. BUT there are some files in frontend which I dont know if I should overwrite or not.

Can you please tell me what are these files and if I should overwrite? Specially what are these .php files doing in front end?

The files are

.DS_Store
.htaccess
favicon_icon
index.php
robots.txt
upload.php
web.config

27th November, 2017

Webiondev123 started a new conversation Laravel Returning Null After Angularjs Http Request • 2 months ago

I am capturing all data but when I send it to server laravel cannot get any data in input.

My form

  <form name="myForm">
                <label>
                    Name:
                   <input type="text" name="userName" ng-model="name" required>
                </label>
                <div role="alert">
                  <span class="error" ng-show="myForm.userName.$error.required">
                   Required!</span>
                </div>
                <label>
                   Course:
                   <select ng-model="selectedCourse" ng-options="course.name for course in courses"><option value="">All</option>
                    </select>
                </label>
                 <label>
                   Status:
                   <select ng-options="stat for stat in lock" ng-model="selectedStatus"><option value="">unlock</option>
                    </select>
                </label>
                <div role="alert">
                  <span class="error" ng-show="myForm.lastName.$error.minlength">
                    Too short!</span>
                  <span class="error" ng-show="myForm.lastName.$error.maxlength">
                    Too long!</span>
                </div>

                <a ng-click="search(name, selectedCourse, selectedStatus)" class="btn btn-green btn-sm input-group-addon"> <i class="fa fa-search" aria-hidden="true"></i> search</a>
              </form>

My angular request:


     $scope.search=function(name, selectedCourse, selectedStatus){

        

        $data= {

          name : name,
          course : selectedCourse['name'],
          stat : selectedStatus

        };

         console.log(JSON.stringify($data));

         $http({
            method: 'get',
            url: base_url + '/filterStudents',
            data : $data

            }).success(function(data, status, headers, config) {

              
                $scope.students=data;
                console.log($scope.students);


    
    }).error(function(data, status){
        
        $('#error').html('code: ' + status);
        $('#alert').fadeIn(1000).removeClass('hide');
    });

    };

My Route

Route::get('/filterStudents', '[email protected]_filter_students');

My input code

  public function admin_filter_students(){

     
     $data=Input::all();
     

    // $result = User::join('students', 'users.id', '=', 'students.user_id')->
    //     leftJoin('courses', 'students.course_id', '=', 'courses.id')->
    //     select('users.id', 'users.name', 'users.type', 'courses.name as coursename', 'users.status')->
    //     where('users.name',  'LIKE', '%' . $data["name"] . '%')->where('courses.name',  $data['course'])->where('status', $data['stat'])->get();

     

    return json_encode($data);


  }
```

Request data

```
just before http

{"name":"john","course":"Executive Diploma in Business Management","stat":"unlock"}

After http success

adminBrowseUsers.js:414 [] //null

```

24th November, 2017

Webiondev123 left a reply on How Can I Use Laravel Classes/traits?? Please Help • 2 months ago

Ok if it were a class instead of trait still it give me problem

Webiondev123 started a new conversation How Can I Use Laravel Classes/traits?? Please Clear Guidelines Needed • 2 months ago

Ok, In Java I can just find the class import it, instantiate object and use it. simple! In laravel I am finding it hard. Say I want to use this trait:

https://laravel.com/api/5.5/Illuminate/Auth/UserTrait.html

And I want to use this method

getAuthIdentifier()

What am I doing is this in index.blade.php

<?php

use Illuminate/Auth/UserTrait;

Usetrait u;

$identity=u->getAuthIdentifier();


?>


then echo

 <!-- Page wraper -->
        <div id="page-wrapper" class="gray-bg">

            <!-- Page wrapper -->
            @include('layouts.topnavbar')

            <!-- Main view  -->
            @yield('content')

            <!-- Footer -->
            @include('layouts.footer')
            {{u->getAuthIdentifier()}}


        </div>

Giving error


Parse error: syntax error, unexpected '/', expecting ',' or ';' (View: C:\wamp64\www\inspina_laravel\resources\views\layouts\app.blade.php) (View: C:\wamp64\www\inspina_laravel\resources\views\layouts\app.blade.php)

22nd November, 2017

Webiondev123 started a new conversation How To Implement Theme In Laravel? • 2 months ago

Ok, I have got this theme http://wrapbootstrap.com/preview/WB0R5L90S

Now how can I integrate with laravel? This is inspina theme

Webiondev123 left a reply on Unable To Upload File On Server : Failed To Open Stream: Is A Directory • 3 months ago

what is the correct syntax?

Webiondev123 started a new conversation Unable To Upload File On Server : Failed To Open Stream: Is A Directory • 3 months ago

Here is my error code:

ErrorException in LecturerController.php line 1081:
file_put_contents(/var/www/k2b/data/www/laravel/dev.oasis-portal.my\files\tasks\dev site login.txt.txt): failed to open stream: Is a directory

My code:


    $title = Input::get('title');
    $description = Input::get('description');
    $group_id = Input::get('group_id');
    $date = Input::get('duedate');
    $filename=Input::get('filename');
    $lecturer_id = Input::get('lecturer_id');

    $timestamps = new \DateTime();

    $ext = Input::get('ext');
    $file =$filename.'.'.$ext;
    //$path = str_replace("/laravel","",base_path()).'/files/tasks/'.$file;

     $path = str_replace("\laravel\dev.oasis-portal.my","\dev.oasis-portal.my",base_path()).'\files\tasks\'.$file;

    $data = Request::get('file');

   

    list($type, $data) = explode(';', $data);
    list(, $data)      = explode(',', $data);

    $data = base64_decode($data);

    

    if (!is_dir(str_replace("\laravel\dev.oasis-portal.my","\dev.oasis-portal.my",base_path()).'\files\tasks\')) {

      File::makeDirectory($path,0777,true);
    }

    //Write to File
    $check = file_put_contents($path, $data);

     


    $fileinformation = array('title' => $title, 'description'=> $description, 'duedate'=>$date, 
      'lecturer_id'=>$lecturer_id, 'file' => $file, 'group_id' => $group_id, 'created_at'=>$timestamps, 'updated_at'=>NULL);


Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.