Techguru

Techguru

Member Since 1 Year Ago

Software Engineer at Hyderabad-India

Experience Points 12,050
Experience Level 3

2,950 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 39
Lessons
Completed
Best Reply Awards 11
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

23 May
1 month ago
22 May
1 month ago

Techguru left a reply on Laravel AWS, Setting Up PhpMyAdmin Issue

@ftiersch okay thanks for the assistance, i ll have a look at it.

Techguru left a reply on Laravel AWS, Setting Up PhpMyAdmin Issue

@ftiersch thank you for tour response , is it good practice to move the phpMyAdmin to the public folder ?

Techguru started a new conversation Laravel AWS, Setting Up PhpMyAdmin Issue

Hi all,

i have hosted my laravel app in aws EC2 instance (Linux 2),

after hosting i changed the Document root from /var/www/html to /var/www/my_project/public as it will be the root folder for laravel, it is working perfectly fine.

I have followed the tutorial for LAMP Stack from this link

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html

My issue is setting up the phpMyAdmin from rds, i have initiated rds also, right now the phpMyAdmin is in folder /var/www/html/.

So when i go to my_ip_address/phpMyAdmin i must be able to see the login page for phpMyAdmin, but i am getting error as

Not Found. The requested URL /phpMyAdmin was not found on this server.

Any help will be apprciated,

Thank you

09 Apr
2 months ago

Techguru left a reply on API Without Passport

@fareedr it is pretty easy , skip the part of passport installation and all, that is it, you are done. The only purpose of passport is to add authentication to your application

14 Mar
3 months ago

Techguru left a reply on Laravel Passport Not Working

@chitesh it would be difficult to debug for me , you keep trying, best of luck. If u find any solution than post the answer here so that others can get the help if they face same issue

Techguru left a reply on How To Add " - " If Word Is Bigger Than 20 Characters.

This should work

if (strlen($text)>20) { $newText = $text.'-' } else { $newText = $text } dd($newText)

Techguru left a reply on Laravel Passport Not Working

@chitesh at which route you are getting unauthenticated ?

Techguru left a reply on Laravel Passport Not Working

@CHITESH - "always giving unauthenticated with valid token".

Valid token in the sense ? you are getting the token from server right ?

Techguru left a reply on Laravel Passport Not Working

@chitesh You have to send the header like

Accept : application/json
Authorization : Bearer token

dont write manually just select the tab suggestions from postman app

Techguru left a reply on Laravel Passport Not Working

Not Working on server ? How you are making request to server api's? post man or are you using any javascript?

Techguru left a reply on Statefull Vs Stateless

@Snapey, Can you share your views about the question above

Techguru left a reply on How To Perform Calculation In Javascript With Array Of Textbox And Array Of Dropdowns

@abdulbazith , what you are asking is a very huge thing to answer, i suggest you to google the javascript product calculator to get the full code and modify it accordingly.

Coming to your question,

How to perform calculation in java-script with array of text-box and array of drop-downs

you need to have distinct id's of each input or text box and the function should use for each function to manipulate the every distinct box

Techguru left a reply on Many Status And Many Logic - How To Proceed

@zaster , i think your approach is well suited for the situation, if those status's are only meant to set and unset than you can use Boolean field in database.

like for example

if ($status->pending == 'true')
{
    //your logic
}
12 Mar
3 months ago

Techguru left a reply on When Building Migrations Do You Assign Foreign Keys As Well?

Hello, @behnampmdg3 ,

Its not necessary to have foreign key in table if are referring to another table , but its good practice to add the foreign key constraints.

Techguru left a reply on FatalErrorException

@vandan

Try this

@if(empty($button->firstpay))
       <button type="submit" name="add" value="1" class="btn btn-primary"> Add </button>                                                                                
@else
     <button type="submit" name="update" value="4" class="btn btn-primary"> Update </button>                   
@endif

Techguru left a reply on If I Make This Software With Laravel 5.7 What Happens In A Few Years?

@behnampmdg3 , looking at the present trends, many of the application which are huge and written in PHP 5 are still on the same version without any issues, because the php 7 has some major breaking changes, hence to migrate from php 5 to php 7 it's a big head ache, so it totally depends if you want to update or continue with same version.

It is not necessary to update but it is good to be updated.

11 Mar
3 months ago

Techguru left a reply on Can You Use Laravel Passport Tokens That Were Generated On One Server To Authorize User Actions Made On Another?

@alex29, i dont agree on your point 3, it's not the right way to approach the issue you are facing, the whole database should be in the site1 itself, if db is present in site2, than to whom you are requesting, being in the same domain? it's kind of not allowed, i havent seen such situation until now

08 Mar
3 months ago

Techguru left a reply on SPA Vs Multi Page Application

@KEL_ - @kel_ the data i am getting from query is again being manipulated and returned so i cant even use pagination at some instances, thats a whole different story, what i am concerned is that some times SPA are not feasible to use (From some forums i have read ) , so just wanted to clarify the doubt

Techguru started a new conversation SPA Vs Multi Page Application

How can i decide between SPA Vs Multi page application ? Which would be better choice for my application ? I know it is totally depends on my type of application, but still i have a doubt regarding performance like page loading? which would be faster ? html or js ? i am already using SPA (We have created our web services (back end)), some times Components loading is very slow due to huge data i have in my data base (Even though i am using pagination). Will it be better to use Multiple page application if i am processing lakhs of db rows?

Any Assistance would be appreciated.

07 Mar
3 months ago

Techguru left a reply on Passport Oauth_access_tokens

Whats the error Code you are getting ??

Techguru left a reply on Laravel Passport

@bellini You must make use of JavaScript (better if u use libraries like react , vue, angular js) and a HTTP client like axios to send request. Once you get the token store it in the local storage of browser and use that token for subsequent requests. Let me tell you what you are asking is termed as "Consuming the API's"

Techguru left a reply on Passport Oauth_access_tokens

May be You can have a look at this. This solved my problem

https://github.com/laravel/passport/issues/802

06 Mar
3 months ago

Techguru left a reply on How To Add Multiple Authentication In Laravel 5.5

May be You could change the boolean to interger and use just like this

1 => Admin
2 => User
3 =>Student
4 => Teacher
19 Feb
4 months ago

Techguru left a reply on How To Make Dynamic Insertion Of Textbox In Table With Dynamic Rows

You need to use java script to add dynamic boxes or rows, than in your controller you need to receive the array and use for-each loop to process (insert into db).

example of java script http://www.mkyong.com/jquery/how-to-add-remove-textbox-dynamically-with-jquery/

Techguru left a reply on "Trying To Get Property 'id' Of Non-object (View: E:\LaravelProject\demoApplication-auth\resources\views\category\add_category.blade.php)"

Check these lines of code, as the error indicates that the object does not contains an id.

 $subcategory = $this->subcategory->create([
                'sc_name' => $request->sc_name,
                'sc_desc' => $request->sc_desc,
                'cat_id' => $category->id
            ]);
13 Feb
4 months ago

Techguru left a reply on Public And Private Visibility In Storage

Can you please elaborate your question with some context, so that some body might help

12 Feb
4 months ago

Techguru left a reply on The Given Data Was Invalid

@ROJONUNOO - You can over ride that by following method

protected function failedValidation(Validator $validator) {
        $message = $validator->errors()->all();
        throw new HttpResponseException(response()->json(['status' => 0,'messages' => $message]));
    }

Techguru left a reply on Method Attempt Does Not Exist Or Auth Guard Driver [api] Is Not Defined.

As per my research Auth::attempt() is for web routes, to implement same in passport we have to use methods provided by passport, which are inside vendor folder.

I have raised the question generally regarding the detailed documentation , but no positive replied yet

https://laracasts.com/discuss/channels/code-review/laravel-passport-8

Techguru left a reply on Consume Laravel API's With Cross Domain ( Front-end )

@BOBBYBOUWMANN - Thank you for the clarification, u mean to say verifycsrftoken should not matter whether its active or in-active ? as in my case i am using api?

Techguru started a new conversation Consume Laravel API's With Cross Domain ( Front-end )

Hi, i have successfully setup the laravel Passport for authentication and created web services, i am consuming them from cross domain ( different domain, i am using react and axios ) . It is working successfully but i have disabled the verifycsrftoken middleware in laravel, because when ever i try to consume my API's i was getting un authenticated message.

So my question is how can i consume web services built in laravel with different domain and VerifycsrfToken middle active?

07 Feb
4 months ago

Techguru left a reply on Laravel Passport Tables

Probably you need to google Oauth 2 for your questions.

04 Feb
4 months ago

Techguru left a reply on Laravel 5.1 Vs 5.5 In 2019

In latest release there are many vulnerability fixes pertaining to security of application, so i would go for the latest.

31 Jan
4 months ago

Techguru left a reply on Mega Web Design

I think you should post such things in Digital marketing websites, this application is built for the developers.

30 Jan
4 months ago

Techguru left a reply on Array To String In Laravel

Can you post the code? along with the exact array you are using

Techguru left a reply on Array To String In Laravel

You have to use implode function

$arr = ['o4', '48', '96']
$result = implode(",",$arr);
28 Jan
4 months ago

Techguru left a reply on Create Session With Laravel API

@GURPREETINDYBYTES - You must use any js library/frame-work like react js , angular js or any other , and you have to use any http client like axios , make request to your API, get the token , store it in local or cookies, use it to make subsequent request

You can find more at https://medium.com/modulr/create-api-authentication-with-passport-of-laravel-5-6-1dc2d400a7f

Techguru left a reply on Laravel Middlewares (loading When Authenticated)

I would suggest applying the middle wares at route level

example

Route::get('posts/{something}', '[email protected]')->middleware('example');

Techguru left a reply on Create Session With Laravel API

@gurpreetindybytes Either you can store the key in local-storage or a in cookie, so the the load will be on client side not on the server, helps you to scale the application easily. The way you are dealing is wrong , that is what i feel personally. According to your title it says create sessions , means load will be on the server , again what you what to store or dont want to use local storage? Your question is not clear

Techguru left a reply on How To Count Unique Website Visitor By Laravel 5.7 ?

Have a look at google analytics

Techguru left a reply on Separate Session For One User Logged With Different Guards

@CECOSD - Depends on quality of the code you write

25 Jan
4 months ago

Techguru left a reply on Separate Session For One User Logged With Different Guards

@CECOSD - I would go for only 1 guard and will have type of user column in the database to differentiate user and admin

Techguru left a reply on Separate Session For One User Logged With Different Guards

The answer for your question is already there in your question it self. What i mean is , when you say different guards it means two separate database, and two separate sessions are maintained in the application. You are saying that you are logging in the user with one table and different guards? i dont think it makes any sense. why do you need different guard for single user ?

Techguru left a reply on Laravel Passport And JWT

Yes as much as i know , i have done the same thing for creating web services, Its totally working fine, i am consuming those API's from different domain ( cross domain). The only thing i needed to do was disable the VerfyCsrfToken middleware

18 Jan
5 months ago

Techguru left a reply on Unauthenticated

@IWANTM8 - Check your middle-wares, the request is going through some middleware, may be VerifycsrfTkon middleware?