Roshanay

Experience

1,180

0 Best Reply Awards

  • Member Since 9 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

19th June, 2018

Roshanay left a reply on Moving Image In Different Directory Through File Storage • 2 days ago

Weirdly, when I give static values, it works, but still gives the same error. Consider the following example.

Storage::move('public/we/caake.jpeg' , 'public/wee/caake.jpeg');

After this statement, the image "caake.jpeg" was moved from we folder to wee folder. But the screen still gave the same issue that the file is not found.

Roshanay left a reply on Moving Image In Different Directory Through File Storage • 2 days ago

Still the same error. I don't understand WHY.

Roshanay left a reply on Moving Image In Different Directory Through File Storage • 2 days ago

                    Storage::move('/path/to/laravel/storage/app/public/' . $item->name. '/' . $files->filename,  'public/' . $request->name . '/' . $files->filename);

Should this work?

Roshanay left a reply on Moving Image In Different Directory Through File Storage • 2 days ago

did that. No change. Is my code wrong or anything?

Roshanay left a reply on Moving Image In Different Directory Through File Storage • 2 days ago

Did that too. like I changed the file. Still the same error.

Roshanay left a reply on Moving Image In Different Directory Through File Storage • 2 days ago

Yes it gives the file name: "/storage/app/public/bc masla kya hai/chin.png"

Roshanay started a new conversation Moving Image In Different Directory Through File Storage • 2 days ago

Okay so I wanted the following: When the users edit the name of the product, the images linked to that name are Moved into a new folder (the edited name. That directory is made on runtime).

Following is my code.

 public function editItem($id, Request $request)
    {
        if (auth::check()) {
            $item = item::find($id);
            if($item->name != $request->name)
            {
                 Storage::makeDirectory('public/' . $request->name . '');
                $file = file::where('item_id', $item->id)->get();
                if ($file != null) {
                    foreach ($file as $files) {

                        $url = Storage::url('' . 'app/public/' . $item->name . '/' . $files->filename . '');
                        
                        $newUrl = Storage::url('' . 'app/public/' . $request->name . '/' . $files->filename . '');
                        Storage::move($url, $newUrl);

                        $fileArray [] = [
                            'namePicture' => $newUrl,
                            'id' => $files->id,
                           
                        ];
                    }
                }
            }
            $item->chef_id = auth()->id();
            $item->name = $request->name;
            //$item->ingredient = $request->ingredient;
            $item->price = $request->price;
            $item->serving = $request->serving;
            $item->featured = $request->featured;
            $item->category = $request->category;
            $chef_id = Auth::user();
            $iid = $chef_id->id;
            $item->chef_id = $iid;
            $item->save();
            $file = file::where('item_id', $item->id)->get();
            if ($file != null) {
                foreach ($file as $files) {
                    $url = Storage::url('' . 'app/public/' . $item->name . '/' . $files->filename . '');
                    $fileArray [] = [
                        'namePicture' => $url,
                        'id' => $files->id,
                       
                    ];
                }
            }

            return redirect()->action('[email protected]');
        } else
            return view('auth.register');
    }

The issue is with this line: Storage::move($url, $newUrl);

It says 'File not found at path: ', even though the file is there. Please help

14th January, 2018

Roshanay started a new conversation Swal For Confirmation On Cancel • 5 months ago

When the user on my system clicks on cancel, I want an "are you sure" pop up, on the regular javascript one. So I used swal.

Following is my php laravel code.

<a href="cancellOrdser/{{$orders->id}}"  onclick="MyFunction();">Cancel</a>

Following is the javascript swal code.

  function MyFunction() {
        swal({
            title: "Are you sure you want to cancel this order?",
            icon: "warning",
            buttons: true,
            dangerMode: true
        });
            .then((willDelete) => {
           if (willDelete) {
                swal("Poof! Your imaginary file has been deleted!", {
                    return true;
                    icon: "success",

                });
            } else {
                return false;
                swal("Your imaginary file is safe!");
    }
    });

    }

The code is showing errors from .then line.

This issue is that I have the desired interface, but I don't know the functionality. How to get the function to do the following: When user clicks okay, the page is redirected and the order is cancelled. If the user clicks no, then nothing happens.

Please tell me how the functionality can be done.

Awaiting ASAP.

9th January, 2018

Roshanay started a new conversation Opening Image With Lightbox • 5 months ago

I am trying Lightbox so that when the user clicks on the image, it opens with the original size. There is an issue. When I click on the first picture, the correct image opens on the lightbox. However, when I click on the next image and all the images after the first image, liightbox still shows the first image.

Probably the issue is with the id or something. I have tried giving an ID so that the lightbox knows which image to display, that id is $number. But it still doesn't work. Following is the PHP code.

 <?php $number = 1; ?>
            @foreach($fileArray as $file)
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <div class="row">
                    <div class="column">
                        {{$number}}
                        <img src=" {{$file['namePicture']}}" height="250" width="400" onclick="openModal();currentSlide({{$number}})" class="hover-shadow cursor">
                    </div>

                    <div id="myModal" class="modal">

                        <span class="close cursor" onclick="closeModal()">&times;</span>
                        <div class="modal-content">
                        <div class="mySlides">
                            <div class="numbertext">{{$number}} </div>
                            <img src=" {{$file['namePicture']}}" style="width:100%">

                        </div>
                        </div>

                        <div class="caption-container">
                            <p id="caption"></p>

                    </div>
                </div>
                <?php $number++; ?>
            @endforeach

Following is the Jquery code


        function openModal() {
            document.getElementById('myModal').style.display = "block";
        }

        function closeModal() {
            document.getElementById('myModal').style.display = "none";
        }

        function currentSlide(n) {
            showSlides(slideIndex = n);
        }

        function showSlides(n) {
            var i;
            var slides = document.getElementsByClassName("mySlides");
            var dots = document.getElementsByClassName("demo");
            var captionText = document.getElementById("caption");
            if (n > slides.length) {slideIndex = n}
            if (n < 1) {slideIndex = slides.length}
            for (i = 0; i < slides.length; i++) {
                slides[i].style.display = "none";
            }
            for (i = 0; i < dots.length; i++) {
                dots[i].className = dots[i].className.replace(" active", "");
            }
            slides[slideIndex-n].style.display = "block";
            dots[slideIndex-n].className += " active";
            captionText.innerHTML = dots[slideIndex- n ].alt;

Please solve this issue.

20th December, 2017

Roshanay left a reply on Sending Email To Gmail Php Laravel • 6 months ago

I marked your answer as correct by mistake. MY ISSUE IS STILL NOT RESOLVED.

Roshanay left a reply on Sending Email To Gmail Php Laravel • 6 months ago

Tried both of the links, did everything they asked. Still the same error.

Roshanay started a new conversation Sending Email To Gmail Php Laravel • 6 months ago

I am trying to set up sending email to my gmail account. I followed various tutorials, made changes to my .env file as follows:

MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=myid MAIL_PASSWORD=mypassword MAIL_ENCRYPTION=tls

Following is my mail.php file contents

'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', '[email protected]'), 'name' => env('MAIL_FROM_NAME', 'Roshanay'), ], 'port' => env('MAIL_PORT', 587), 'host' => env('MAIL_HOST', 'smtp.gmail.com'), 'driver' => env('MAIL_DRIVER', 'smtp'),

Following is the route: Route::get('/mail', function(){ Mail::send('mail', ['name'=> 'Roshanay'], function($message) { $message->to('myid', 'Roshanay')->from('myid')->subject('New Order!'); }); });

I made the blade as mail.blade.php

I did EVERYTHING all the tutorials said. But I get this error:

stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

Please tell me how to resolve it.

15th November, 2017

Roshanay left a reply on Sending Php Data Through Html Form To Jquery • 7 months ago

So what's the solution?

Roshanay started a new conversation Sending Php Data Through Html Form To Jquery • 7 months ago

I am developing a system in which when the user places the order and it gets delivered, user gets the option of rating the item on the homepaage.

One order has multiple options. When the items are rated, in the backend, the status of the order is changed from delivered to rated, so that the user doesn't keep seeing it on their homepage.

Following is the html code.

@foreach($itemsArray as $order)
    <div id="orderArea">
    @while($count<1)
    {{$order['status']}} {{$order['id']}} {{$order['total']}}<br>
       <?php  $count++; ?>
    @endwhile
        <?php
        ?>

    Item: {{$order['name']}}
    <form>
       Rate: <input name="rate" id="rate" Orderid="{{$order['id']}}" ><br>
       Comment: <input name="comment" Itemid="{{$order['itemId']}}" id="comment"><br>
        <input name="submit" type="submit" value="submit" id="{{$submit}}" itemidd="{{$order['itemId']}}">
        <?php $submit++; ?>
    </form>
    <br>
</div>
@endforeach

Following is the jquery code.

$(function () {

        $('form').on('submit', function (e) {
            var rate = $('#rate').val();
            var comment = $('#comment').val();
            var itemId = $('#submit').attr('itemidd');
            //var itemId = $(this).attr('itemidd');
            var Orderid = $('#rate').attr('Orderid');
            alert(itemId);
            e.preventDefault();

            $.ajax({
                type: "post",
                url:  "{{route('storeRating')}}",
                data:
                    {
                        rate: rate,
                        comment: comment,
                        itemId: itemId,
                        Orderid: Orderid
                    },

                success: function (result) {
                    console.log(result);

In this code, the order id and total are showed. Then the items are showed with the option of user to rate. When the user clicks the submit button, only the value of the first item is being given. if the user clicks on the submit button on any item, the function reads the id of the first item of every order.

Please Help.

14th November, 2017

Roshanay left a reply on Help With Socialite, Github Package • 7 months ago

Got it, thanks. My website is not on the internet right now. I'll buy a domain name soon and put the website up and then will be able to the rest. Right?

Roshanay left a reply on Help With Socialite, Github Package • 7 months ago

Still the same.

I don't understand the following line: Fill in the ID and Secret pairs with what you see on your Facebook App dashboard.

Please explain this.

Roshanay left a reply on Help With Socialite, Github Package • 7 months ago

https://www.facebook.com/v2.10/dialog/oauth?client_id=your-facebook-app-id&redirect_uri=http%3A%2F%2Fchefonline.dev&scope=email&response_type=code&state=9SFR5ftefhbKWoHLzuRfODD2mqifp4u5ShacDIwK&sw_fnr_id=2321304462&fnr_t=2

This is the link. I haven't created the app. I just created the front end login dialog box and pressed submit. This is where it's redirecting to.

Roshanay started a new conversation Help With Laravel Eloquent • 7 months ago

Hi, I want to get the order records which either have the status of delivered or rated. I am writing the following code:

$orders = order::where('id', $orderItem->id)
                ->where('status',  'delivered'||'status',  'rated')

But this doesn't show the result.

If I use

$orders = order::where('id', $orderItem->id)
                ->orWhere('status',  'delivered'||'status',  'rated')

Even then it doesn't show the correct result. Please help.

Roshanay left a reply on Help With Socialite, Github Package • 7 months ago

There is nothing being displayed iin that file.

13th November, 2017

Roshanay started a new conversation Socialite Github Package • 7 months ago

I used Socialite package by Github, for login with facebook option in my system.

It goes to facebook for user details, however, I don't think the callback is coming in. When I click login, it goes to facebook and it says: Sorry, something went wrong.

We're working on getting this fixed as soon as we can.

The function in the login controller for callback is as follows

 public function handleProviderCallback()
    {
        $user = Socialite::driver('facebook')->user();
        var_dump($user);die();


        // OAuth Two Providers
        $token = $user->token;
        $refreshToken = $user->refreshToken; // not always provided
        $expiresIn = $user->expiresIn;

        // OAuth One Providers
        $token = $user->token;
        $tokenSecret = $user->tokenSecret;

        // All Providers
        $userid = $user->getId();
        $username = $user->getName();
        $useremail = $user->getEmail();

        $userrr = User::all();
        foreach ($userrr as $user) {

            if ($user->id == $userid) {
                return redirect()->action('Auth\[email protected]');
            }

                else {
                    $userr = new User();
                    $userr->name = $username;
                    $userr->id = $userid;
                    $userr->email = $useremail;
                    $userr->role = 1;
                    return view('user.profile')->with('user', $user);

                }
        }

        // $user->token;
    }
$userrr = User::all();

From this line, the code checks if the user is new or old. If the user is old, it redirects to home. If the user is new, it saves their details and then sends to another function, which redirects them.

However, this part of the code isn't even functional as of yet, because I think I am not getting the callback or response from facebook server. Please help.

Roshanay left a reply on Help With Socialite, Github Package • 7 months ago

Okay, so I made the front end. The request is being sent to facebook. But when it is redirected, it says : Sorry, something went wrong.

We're working on getting this fixed as soon as we can.

Following is the function in the login controller.

 public function handleProviderCallback()
    {
        $user = Socialite::driver('facebook')->user();


        // OAuth Two Providers
        $token = $user->token;
        $refreshToken = $user->refreshToken; // not always provided
        $expiresIn = $user->expiresIn;

        // OAuth One Providers
        $token = $user->token;
        $tokenSecret = $user->tokenSecret;

        // All Providers
        $user->getId();
        $user->getNickname();
        $user->getName();
        $user->getEmail();
        $user->getAvatar();

        // $user->token;
    }

Roshanay left a reply on Help With Socialite, Github Package • 7 months ago

Also, how do I link it with my frontend? Sorry for so many questions. They might seem immature. But I am doing something like this for the first time and need help.

Roshanay left a reply on Help With Socialite, Github Package • 7 months ago

public function handleProviderCallback($service)
    {
        $provider = Socialite::driver($service);

        $socialiteUser = $provider->stateless()->user();

        dd($socialiteUser);
    }

where do I place this function?

Also, instead of service, I write facebook, right? Because I want login from facebook option.

12th November, 2017

Roshanay started a new conversation Help With Socialite, Github Package • 7 months ago

I am developing a website in which I want to give the user an option to login with facebook. For that, I am trying Socialite package by GitHub.

I am taking commands from this website. https://github.com/laravel/socialite

I have done everything till config/app.php file.

Further, I don't know what to do about the following. 'github' => [ 'client_id' => 'your-github-app-id', 'client_secret' => 'your-github-app-secret', 'redirect' => 'http://your-callback-url', ],

In config/services.php file, I have written the following: 'facebook' => [ 'client_id' => 'your-facebook-app-id', 'client_secret' => 'your-facebook-app-secret', 'redirect' => 'http://chefonline.dev', ], But I think this isn't correct.

Further, I have added the functions they asked to make in login controller file. But, after that, I don't know is meant by the following:

  1. scopes
  2. return Socialite::driver('google') ->with(['hd' => 'example.com'])->redirect();
  3. Stateless Authentication code, return Socialite::driver('google')->stateless()->user(); , where do I place this?
  4. I don't know where to place the code written in Retrieving User Details and Retrieving User Details From Token

PLEASE HELP.

31st October, 2017

Roshanay started a new conversation Displaying Data In JavaScript • 7 months ago

I am sending an ID using javascript to backend server. The ID is matched with the table records and the correct data is sent back by the php function to the javascript function which then displays the result. The ID is correctly being sent and the correct answer is being sent to the front end. But, I don't know how to display the data. Following is the function of php.

In this function, the information is being stored in an array. The name, price and chef. This information has to be displayed. I am sending it in json form.

public function showorderdetail(Request $request)
    {
        Log::info("id".$request->orderId);
        $itemsArray = [];
        $orderId = $request->orderId;
        $order = order::where('id', $orderId)->first();
        $itemId = orderitem::where('order_id', $order->id)->get();
        foreach ($itemId as $itemIds)
        {
            $items = item::where('id', $itemIds->item_id)->get();

            foreach ($items as $item)
            {
                $itemsArray[] = [
                    'name' => $item->name,
                    'price' => $item->price,
                    'chef' => $item->chef_id,
                ];
            }

        }
        return json_encode($itemsArray);
    }

Following is the javascript function. In the success part, the data has to be displayed. I don't know the function that should be used or how it is going to be used.

$('.viewOrderDetail').click(function () {
        var orderId = $(this).attr('orderId');
        console.log(orderId);
    $.ajax({
        type: "get",
        url: "{{route('showorderdetail')}}",
        data: {
        orderId: $(this).attr("orderId")
        },
        cache: false,
        success: function (result) {
            console.log(result)
       
            $('#detail').html("<p>" + name + " " + " "+ price +  "</p>");
        }
    });
    });


Please help.

24th October, 2017

Roshanay started a new conversation Jagvascript Function Call In Html • 7 months ago

I am making a cart. The users are able to view the cart through javascript. When a user enters the quantity, and licks on add. Javascript function is called which adds the product in the array and shows the cart. In the success function, I am displaying the cart with the relevant details of the product. I also have to give the option of removing a specific product. So when the user clicks on remove, the data is sent to be deleted. Following is the code snippet for that.

''' success: function (result) { $('#ViewCart').html(""); $.each(result, function (key, val) { $('#ViewCart').append("

" + " " + val.id + " " + val.name + " " + val.qty + "<button class="remove" >Remove" +"

"); });

        }

'''

I have made the remove function like this ''' $('.remove').click(function () { alert('coming here'); }); ''' This is just to check if the function is working on not. As it turns out, it is not working because the alert doesn't pop up. Can someone please tell me the fault?

17th October, 2017

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

Okay! Otherwise, I shall be waiting for you. Thanks.

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

  1. {{$items->name}} shows that id is being brought too. For showing id, I just have to write {{$items->id}}. But I don't know where should I write it to be sent along with the quantity. That's also where I need a little help.
  2. Yes, what I want is that user will click add on every item they want, then click another button, which will send the item ids and their quantities to the server. However, I haven't made that button yet, because I wanted the values to be read properly first. Should I make that right now?
  3. What was happening earlier was, when I clicked on Add to Cart, only the first product was showing the input field. That's because every time any other Add to Cart button was clicked, the id was same. So, I initialized these variables and at the end of foreach loop, I add 1 to each, like: This way, the ids are unique. Do you understand?

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

@foreach($item as $items)
    {{$items->name}}
    
    div id="{{ $quantityy }}" style="display: none;">
            <label for="quantity" >Quantity</label>
            {{--// use classname instead of id. ID needs to be unique (one per page)--}}
            <input type="number" class="quantityid" name="quantity">
            <button class="addd" divAdd="{{$addd}}">Add!</button>
        </div>
@endforeach 

All the products will be displayed. They will have an option of Add to Cart. User clicks, an input field for quantity is opened. When user clicks on Add, the ajax function is called. User can add many products by clicking on add to cart.

I want to send the ids of each item along with their quantity to the backend server. Above, I have written the html/blade.

Below, is the function that I initially wrote and you changed for debugging purposes.

 $('.addd').click(function () {

        var mydata;


        $('input[name="quantity"]').each(function(){
            mydata = $(this).val();
           // window.alert(mydata);
        });

        $.ajax({

            type: "get",
            url: "{{route('add')}}",
            data: mydata,
           //data: {quantity: $('#quantityid').val()},
            cache: false,
            success: function (quantity) {
                console.log(quantity);
            }
        });
    });

Clear now?

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

Sorry, I will tell you. Wait

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

I'll tell you, but first can you tell if at the end backend, the server is receiving one quantity multiple times or just once?

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

When the values are sent to the server, with your code, a value of one row is sent one time or repeatedly? I want all values to be sent just once, with the product id.

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

Using your function and html, the values are fine. Like each time I click on add on different input fields, the values are fine, however, they are being repeated.

Like for example, if I add 1 in the first row and 3 in the second. When I click on 3rd row and write 5, then all 1, 3, and 5 are added again. Do you understand?

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

$('.addd').click(function () {

        var mydata;


        $('input[name="quantity"]').each(function(){
            mydata = $(this).val();
           // window.alert(mydata);
        });

        $.ajax({

            type: "get",
            url: "{{route('add')}}",
            data: mydata,
           //data: {quantity: $('#quantityid').val()},
            cache: false,
            success: function (quantity) {
                console.log(quantity);
            }
        });
    });

This?

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

$('.addd').click(function(e) {
    e.preventDefault();  // prevent normal click function

    // get the quantity value for each input
    $('.quantityid').each(function(e) {
        console.log($(this).val();
    });
});

should I replace my function with this?

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

$('.addd').click(function () {

       $('input[name="quantity"]').each(function(){
           var mydata = $(this).val();
       });

       $.ajax({

           type: "get",
           url: "{{route('add')}}",
           data: mydata,
           cache: false,
           success: function (quantity) {
               console.log(quantity);
           }
       });
   });

Still same error of mydata being undefined.

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

            <label for="quantity" >Quantity</label>
            <input type="number" id="quantityid" name="quantity">
            <button class="addd" divAdd="{{$addd}}">Add!</button>
        </div> ``` 

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

I don't know what the issue is but the html code is not displaying.

In the first div, there's id="{{ $quantityy }}" then the input has id="quantityid" and name="quantity" and then submit button has class="addd" (the function call) and divAdd="{{$addd}}

Roshanay left a reply on Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

Quantity Add!

html code

Roshanay started a new conversation Sending Multiple Values Of Same Input Field Via Ajax. • 8 months ago

The products are displayed. And there is an option of adding to the cart. When the user clicks on the button, it displays the quantity window. The user types the quantity and clicks on edit button. The issue previously was that only the data of first input field was going. So I changed the code and made the following ajax call:

$('.addd').click(function () {

    $('quantity').each(function(){
        var mydata = $(this).val();
        window.alert(mydata);
    });

    $.ajax({

        type: "get",
        url: "{{route('add')}}",
        data: mydata,
        cache: false,
        success: function (quantity) {
            console.log(quantity);
        }
    });
});

Now, the issue is that console shows that mydata is undefined variable. I think I am not putting the issue is with ('quantity'). I guess the issue is with html. Following is the html. Please let me know how to resolve this issue.

Quantity Add!

16th October, 2017

Roshanay started a new conversation How To Send Ajax Request To The Server. • 8 months ago

I am making a system in which products are displayed and each one has the option of Adding to Cart. When the user clicks the button, an input field appears, where user types their quantity and then click on add. When the add button is clicked, Ajax call is sent through the following function:

$('.addd').click(function () { $.ajax({ type: "POST", url: "{{route('add')}}", data: {quantity: $('#quantityid').val}, cache: false, success: function (result) { alert("added") } }); });

#quantityid is the html which is as follows:

Quantity Add!

However, the console is giving the following error: POST http://chefonline.dev/add 419 (unknown status)

Please tell me what's the problem and what's the solution

23rd September, 2017

Roshanay started a new conversation Trying To Get Property Of Non-object Error Php Laravel • 8 months ago

I am making a function in the controller to register chef, a type of a user. The user can upload a picture as well. Following is the code for that.

{

    $chef = new chef();
    $chef->name = $request->name;
    $chef->company = $request->company;
    $chef->email = $request->email;
    $chef->password = $request->password;
    $chef->address = $request->address;
    $chef->number = $request->number;
    $file = Input::file('picture');
    $file -> move ('images', $file->getClientOriginalName());
    $chef->picture = $request->file('picture');
    echo '<img src"images/'. $file->getClientOriginalName(). '"/>"';


    $chef->save();
    return view("checkimage")->with('chef', $chef);
}

It's working perfectly fine till here. The next step is to display the users.

Following is the code for that blade.

@foreach($chef as $chefs) {{ $chefs->name }}

@endforeach

However, it's showing an error. Trying to get property of non-object. I have tried everything, but it's not being fixed. Please tell me a solution.

22nd September, 2017

Roshanay left a reply on Image Intervention Usage PHP Laravel 5.4 • 8 months ago

I have been trying, but couldn't get throuugh. Can you tell me how that's done?

Roshanay left a reply on Image Intervention Usage PHP Laravel 5.4 • 8 months ago

Yes I did. And again, they are giving foo.jpg example. This is a static example. I want a dynamic way.

Roshanay started a new conversation Image Intervention Usage PHP Laravel 5.4 • 8 months ago

I successfully installed image intervention package. But now I don't know how to use it. I googled and saw saw many videos. Everywhere, they give example of foo.jpg. But I want to upload dynamically, for every user. Moreover, in the examples, there is a specific controller for the image. But I tend to keep the picture uploading in the same controller as the user. Like for example, user registers, fills name, nnumber, uploads picture. How can that happen?

Roshanay left a reply on Image Intervention Package • 8 months ago

This video is not working for me, since I haven't paid for it. I googled and youtubed a lot. The issue is that there are examples of foo.jpg being shown everywhere. But I want to do it dynamically, so that every user can upload a picture. Moreover, in the examples, there is a specific controller for the image. But I tend to keep the picture uploading in the same controller as the user. Like for example, user registers, fills name, nnumber, uploads picture. How can that happen?

21st September, 2017

Roshanay left a reply on Image Intervention Package • 9 months ago

Can you also tell me, now that I have installed the package. Where do I upload the images?

Roshanay left a reply on Image Intervention Package • 9 months ago

Done. Thank you so much.

Roshanay left a reply on Image Intervention Package • 9 months ago

But it doesn't allow $. What to do then?

Roshanay started a new conversation Image Intervention Package • 9 months ago

I am trying to install image intervention package.

when I write $ php composer.phar require intervention/image, it say $ is not allowed. The only way it works is composer install. That works.

But when I update the composer.json file with "intervention/image": "dev-master", in require and then update composer file with the command composer install, it says nothing to update.

What's the issue? Also, there are multiple composer.json files. I write this in base-dir file.

Please help me.

Edit Your Profile
Update

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