wontoneesaju

wontoneesaju

Member Since 1 Year Ago

Experience Points
1,640
Total
Experience

3,360 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
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 1
1,640 XP
Jul
14
1 year ago
Activity icon

Started a new conversation Issue With The Model

I am facing one issue my model are not binding with the input values

this is my model

namespace App\Model\Setup;

use Illuminate\Database\Eloquent\Model;

class Venueinfo extends Model { //

//use Notifiable;
protected $table="venue_info";

/**
 * The attributes that should be hidden for arrays.
 *
 * @var array
 */
protected $fillable =[
    'venue_name','venue_businessname','venue_type,','venue_taxid'
];

public $timestamps = false;

}

// save all data $venueid=Auth::user()->id; // object of venue info /* $venueinfo=new Venueinfo; $venueinfo->id=$venueid;

    $venueinfo->venue_name=Input::get('vname');
    $venueinfo->venue_businessname=Input::get('bname');
    $venueinfo->venue_type=Input::get('vtype');
    $venueinfo->venue_taxid=Input::get('taxid');
    $venueinfo->save();
    */
    \App\Model\Setup\Venueinfo::where('id',$venueid)->delete();
    \App\Model\Setup\Venueinfo::create([
        'venue_name' => Input::get('vname'),
        'venue_businessname' => Input::get('bname'),
        'venue_type' => Input::get('vtype'),
        'venue_taxid' => Input::get('taxid')
    ]);

if i will print Input::get('vname'); this will display the values but when i am binding it with the model i dont know its not fetch data,

Jul
03
1 year ago
Activity icon

Replied to Passing Variable From Middleware To Blade

@grenadecx correct some time we need something in the middleware which we need it globally.

:) it works.

Activity icon

Started a new conversation Passing Variable From Middleware To Blade

i am passing a variable from middleware to blade. But its not coming. this is my code

public function handle($request, Closure $next) { $profilestatus=AuthUser::getprofiledetails('venue_login','status'); $systemalert="";

    $request->merge(compact('profilestatus'));

    

    
   return $next($request);
}
Jul
02
1 year ago
Activity icon

Started a new conversation Route Protection From Directly Accessing Url In Browser

http://192.168.1.3/vapp/public/processregister this is my url or route name processregister which works from ajax call.

now if any user trying to open this url directly in the browser then it prompt a error.

I have created a middleware for that

public function handle($request, Closure $next) {

if($request->ajax()) {
    return $next($request);
}

// abort(403, "Unauthorized Access!");

return view('errors.404');

}

in kernel

'ajax'=>\App\Http\Middleware\AjaxPost::class

in route

Route::post('processregister',array('uses'=>'[email protected]'))->middleware('ajax');

Activity icon

Replied to Protect Route Pages

Not that.

I am again describing my question

http://192.168.1.3/vapp/public/processregister this is my url or route name processregister which works from ajax call.

now if any user trying to open this url directly in the browser then it prompt a error.

I have created a middleware for that

public function handle($request, Closure $next) {

    if($request->ajax()) {
        return $next($request);
    }
   // abort(403, "Unauthorized Access!");

    return view('errors.404');
}

in kernel

'ajax'=>\App\Http\Middleware\AjaxPost::class

in route

Route::post('processregister',array('uses'=>'[email protected]'))->middleware('ajax');

Jul
01
1 year ago
Activity icon

Replied to Protect Route Pages

:) i am saying suppose if any one directly enter the route url in the browser how can i protect them.

Its through middleware.

Jun
30
1 year ago
Activity icon

Started a new conversation Protect Route Pages

hi

I want to know how can i protect route pages directly accessing by putting URL in browser.

Jun
22
1 year ago
Activity icon

Started a new conversation Amazon Ses Issue In Laravel

My amazon ses with smtp is working fine, but when i am using without amazon ses smtp. it will prompt one error.

Error retrieving credentials from the instance profile metadata server. (Client error: GET http://169.254.169.254/latest/meta-data/iam/security-credentials/ resulted in a 404 Not Found response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt (truncated...) )

i have set my access keys in

  1. env.
  2. config/services.php
  3. config/mail.php -> ses
Jun
19
1 year ago
Activity icon

Replied to Laravel Mail With Variable Passing Between Classes

$this->token yes this one works, i had used $this->$token by mistake and then remove it.

:) thanx

Activity icon

Replied to Laravel Mail With Variable Passing Between Classes

problem is token value is not picking from the registercontroller, yes i can also see everything is ok but dont know its not picking up the value for $token

Activity icon

Replied to Laravel Mail With Variable Passing Between Classes

ErrorException (E_NOTICE) Undefined variable: token

Activity icon

Replied to Laravel Mail With Variable Passing Between Classes

@Yorki RegisterController

$token=Hash::make(str_random(60));

i am already having this line, you can see it in the above.

Activity icon

Started a new conversation Laravel Mail With Variable Passing Between Classes

I am having two classes

  1. Controller - RegisterController

  2. Mail/Registeruser -

i am passing a token variable from register controller to mail/registeruser

my coding is this

RegisterController

$token=Hash::make(str_random(60));

      User::create([
            'email' => Input::get('email'),
            'password' => Hash::make(Input::get('password')),
            'status'=>0,
            'activation_token'=>$token
        ]);

        // Send email for activation
       Mail::to(Input::get('email'))->send(new RegisterUser($token));

Mail/ RegisterUser

class RegisterUser extends Mailable { use Queueable, SerializesModels;

public $token;


/**
 * Create a new message instance.
 *
 * @return void
 */
public function __construct($token)
{
    //
    return $this->token=$token;



}

/**
 * Build the message.
 *
 * @return $this
 */
public  function build()
{
    $token=Hash::make(str_random(60));
    return $this->markdown('mail.register')
    ->from('[email protected]','Hello Welcome')
    -> with ([
        'url'=>url()->current().'/activationreg?'.$token
        ]);
}

}

Jun
15
1 year ago
Activity icon

Replied to Nginx Issue

its fix now

  1. i just have created two nginx block configuration one for .com folder and another for its sub folder, its now working fine.
Activity icon

Started a new conversation Nginx Issue

hi

i am facing one issue with my AWS server, in my larave only default file is opening.

This configuration block

location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. #try_files $uri $uri/ =404; #try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.php$is_args$args; }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
            include snippets/fastcgi-php.conf;
    #
    #       # With php7.0-cgi alone:
    #       fastcgi_pass 127.0.0.1:9000;
    #       # With php7.0-fpm:
    #       fastcgi_pass unix:/run/php/php7.0-fpm.sock;
            fastcgi_pass unix:/run/php/php7.0-fpm.sock;

    }

Everything is correct , i am not getting where the thing is making a issues.

http://modetrack.com/webapp/public/

this is the sample test url

http://modetrack.com/webapp/public/sjsjsj - it should open any error page

Jun
12
1 year ago
Activity icon

Started a new conversation Laravel Auth Login Index Password Issue

i am facing a issue with the laravel auth

this is my code

public function dologin(){ // create our user data for the authentication $userdata = array( 'venue_emailid' => Input::get('email'), 'venue_password' => Hash::make(Input::get('password')) );

//attempt to do the login
if (Auth::attempt($userdata)) {

     // validation successful!
    // redirect them to the secure section or whatever
    // return Redirect::to('secure');
    // for now we'll just echo success (even though echoing in a controller is bad)
    echo("1");



}

else{ // Login count =0
    echo("0");
}

}

i am using model user for this. Every thing is working fine. But it always giving me this error.

Activity icon

Replied to Issue In Auth

hi

field name in registration controller is not changed and that works fine with the original input names. But yes after the registration it is redirecting me to the home page where authorisation username not coming in the top bar.

Now lets go the another case. Logincontroller.

In login controller we will change the input name else it will not match the database columns.

it is simple make a laravel auth scaffold and change the fields based on our need.

Jun
11
1 year ago
Activity icon

Replied to Issue In Auth

if i will change this then it will not fetch the field values.

public function getAuthPassword() { return $this->venue_password; }

this is also not working :)

Activity icon

Replied to Issue In Auth

@naing yes this i am having already.

public function username() { return 'venue_emailid'; }

let me try it with another one.

Activity icon

Replied to Issue In Auth

one last issue, in the default laravel auth, everything works, except i am thinking its session issues or something

My login page is not redirecting, i am thinking it is authenticating but unable to create session.

Activity icon

Replied to Issue In Auth

protected $primaryKey="venue_id"; its fixed...

Activity icon

Replied to Issue In Auth

:) simple e issue.

One more quick question

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause'

now it is showing me this error. I want to change this column name with venue_id. This "id" column is the default field name for laravel auth

Activity icon

Replied to Issue In Auth

@Nasmed its not about mass, sql query fill able fields are all fine, but it is ignoring email id column.

Activity icon

Replied to Issue In Auth

protected $fillable = [ 'venu_emailid', 'venue_password', ];

:) that i already having.

Activity icon

Started a new conversation Issue In Auth

i am using a inbuilt auth functionality of laravel. Everything works fine, but in one place i dont know its not taking the email id field.

This is my function

protected function create(array $data) {

    return User::create([
    
        'venue_emailid' => $data['email'],
        'venue_password' => bcrypt($data['password']),
       
        
    ]);
}

Error which i am getting is

SQLSTATE[HY000]: General error: 1364 Field 'venue_emailid' doesn't have a default value (SQL: insert into venue_login (venue_password, updated_at, created_at) values ($2y$10$OjmgFCEfcWyPZOCsB4OsnuBGtxv/duNlvylFoiXIh1uPMZx9ZrFB., 2018-06-11 06:56:42, 2018-06-11 06:56:42))

in insert query it skip the email id column.

May
18
1 year ago
Activity icon

Started a new conversation How To Use A Dynamic Page Title In A Laravel Application?

i am looking to link my page title with the language file name pagetitle.php. I can do this normally via route by defining its page_title as a variable but i want page title should be link to my language file.

Currently my code in the route is this

Route::get('/', function () { $page_title="Wontone"; return view('index')->with(compact('page_title')); }

May
12
1 year ago
Activity icon

Replied to React Props Value

:) its not a copied code , default react code or we can simply say react code with little bit of rendering html element to making its component.

:) code is not a copied one. actually i can use another method to use porps in a function and that works. But i want to use function inside the class . It can possible through some const. But i am learning react and react native.

let me try it in another react forum.

May
11
1 year ago
Activity icon

Started a new conversation React Props Value

my code is this

hi

i want to get the prop value of the component

export default class App extends Component {

//constructor(props){

//super(props); //}

render(){ return(

  <div className="person">
  <h1>{  }</h1>
  <p> Your age is 37</p>
  
  
  </div>

); } }

ReactDOM.render(, document.getElementById('root'));

my code is like this.

i want to fetch its props value like name and age.

Activity icon

Started a new conversation React, Csrf

hi

i want to know whats the best way to access the CSRF token in react front end using laravel as a back end.

return(

May
10
1 year ago
Activity icon

Replied to I Am Getting A Diff Error

at last its resolved :).

it was actually different type of issue. if anybody facing this issue first they should check the I/O error in their drives.

i just fixed it now. :)

May
09
1 year ago
Activity icon

Replied to I Am Getting A Diff Error

hmm that :) already deleted. if i will freshly install it prompt me a same message.

Activity icon

Started a new conversation I Am Getting A Diff Error

i am getting a error and its different i dont how it is coming. my net connection is also fine.

D:\web\htdocs\KonektorFleet\fleetapp>composer create-project laravel/laravel admin-app Installing laravel/laravel (v5.6.21)

  • Installing laravel/laravel (v5.6.21): Downloading (100%) Failed to download laravel/laravel from dist: The archive may contain identical file names with different capital zation (which fails on case insensitive filesystems): ZipArchive::extractTo(D:\web\htdocs\KonektorFleet\fleetapp/vend r/composer/b2a96a0c/laravel-laravel-3f92cf6\app\Http\Middleware/TrimStrings.php): failed to open stream: Invalid argu ent Now trying to download from source
  • Installing laravel/laravel (v5.6.21): Cloning 3f92cf66f5 from cache

[RuntimeException] Failed to clone https://github.com/laravel/laravel.git via https, ssh protocols, aborting.

  • https://github.com/laravel/laravel.git fatal: destination path 'D:\web\htdocs\KonektorFleet\fleetapp\admin-app' already exists and is not an empty dir ectory.

  • [email protected]:laravel/laravel.git fatal: destination path 'D:\web\htdocs\KonektorFleet\fleetapp\admin-app' already exists and is not an empty dir ectory.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-u l REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--ke p-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []

May
07
1 year ago
Activity icon

Started a new conversation Laravel And React Cache Issues

hi i am using a laravel with react front end. But i am getting too much cache issues.

i checked with all these command.

php artisan config:clear php artisan cache:clear php artisan view:clear

Activity icon

Started a new conversation Laravel And React Cache Issue

hi i am using a laravel with react front end. But i am getting too much cache issues.

i checked with all these command.

php artisan config:clear php artisan cache:clear php artisan view:clear

May
04
1 year ago
Activity icon

Replied to Class Of Authorise.net

same thing i am installing in my linux server. but composer is not able to install the authorizenet sdk files

[[email protected] laravel]$ composer require authorizenet/authorizenet Using version ^1.9 for authorizenet/authorizenet ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev)

i am getting this error.

but if i am installing composer outside the laravel folder it works fine without any issue

May
03
1 year ago
Activity icon

Replied to Class Of Authorise.net

yes its works.

Activity icon

Replied to Class Of Authorise.net

let me try it

Activity icon

Replied to Class Of Authorise.net

its a package we are getting from the authorise.net SDK, whole file is in the lib folder.. But this SDK having different composer not using the laravel.

https://github.com/AuthorizeNet/sdk-php

this is the authorise.net payment gateway SDK.

Activity icon

Started a new conversation Class Of Authorise.net

hi

i am using the authorise.net classes and integerate it in laravel.

my all classes are in vendor/lib folders

but i am always getting error

use lib\net\authorize\api\contract\v1 as AnetAPI; use lib\net\authorize\api\controller as AnetController;

class not found.

May
01
1 year ago
Activity icon

Replied to Incorrect Date Value

$duedate=Carbon::createFromFormat('d/m/Y', $req->input('invduedate'));

its saying data missing

Activity icon

Started a new conversation Incorrect Date Value

hi

I am facing a issue called incorrect date value in controller file

Invalid datetime format: 1292 Incorrect date value: '10/10/2018' for column 'invduedate' at row 1 (SQL: insert into invoice(custid,compid,invduedate) values('5','1','10/10/2018'))

i want to know is there any function for this?

Apr
27
1 year ago
Activity icon

Replied to Fetching String From A Url

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

i will try this tonight.

But my route page having session checks.

route::get('/editcomp/compid/{id}', this one i am also using and tried it. But my route page having session checks.

if the url is with the question mark i am using this. But if without a question mark then i am using same like yours. if i will use this way '[email protected]'); then i have to write a session checks in controller function [email protected]

Route::get('editcomp', function(){ $page_title="Invoice Management App - Edit Customer"; if(Session::has('myusername')) { return view('companies.editcomp',compact('page_title')); } else{ return redirect('index')->with('status','Please login to access this app');

}

});

Activity icon

Replied to Fetching String From A Url

testing

this is my url reroute which open the edit page but based on the compid.

Activity icon

Replied to Fetching String From A Url

Question is simple

http://127.0.0.1:8000/editcomp/compid/2

i want to know its query string value in blade.

Apr
26
1 year ago
Activity icon

Replied to Fetching String From A Url

hi am fetching data in my blade view through a controller function and this function having two parameters.

Activity icon

Started a new conversation Fetching String From A Url

hi

http://127.0.0.1:8000/editcomp/compid/2

i want to fetch string from this url, in php i can do it. But whats the best way to route this query string?

Activity icon

Replied to Calling Controller Function In Route

i just changed my code yesterday with this way. And the logic works well.

public static function viewallcomp(){

        $companyall=DB::table('company')->paginate(10);
        if(Session::has('myusername')){

            return view('companies.listcomp', ['companyall' => $companyall,'page_title'=>'Invoice Management App - List of company']);


        }
        else{

            return redirect('index')->with('status','Please login to access this app');

        }

         }

and in route

Route::get('listcomp','[email protected]');

and same like this way

// list-companies.blade.php @foreach ( $companies as $company) {{ $company->name }} @endforeach

// to display pagination links {{ $companies->links() }}

Activity icon

Replied to Calling Controller Function In Route

Route::get('/list-companies','[email protected]')->name('list.companies.index.);

this syntax is wrong....name('list.companies.index.); one comma missing. Can you tell me list.companies.index? how this line comes?

thats only specify the route name for the controller action i think