WEBTRICKSHOME FORUM

Jiwan Thapa

03 Apr, 2018

How Can I Login In Laravel Using The Username In Place Of Email Address?

Go to Vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers.php Search for the method username and return name instead of email public function username() { return 'name'; } Change the login field in login page to allow username as input value. <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> <label for="name" class="col-md-4 control-label">Use... Read more »

1 Answer       2912 Views

Anonymous

29 Mar, 2018

How Can We Create A Function For Multiple Image Uploads In Laravel?

Let's create a function to upload image first. public function uploadimage($foldername, $imageindex){ $name = $imageindex->getClientOriginalName(); $imageindex->move(public_path().'/'.$foldername,date('ymdgis').$name); return date('ymdgis').$name; } $foldername is the directory where the uploaded images will be stored and imageindexis the array where the image informations will be stored. move() function will move the ... Read more »

1 Answer       3407 Views

Anonymous

05 Mar, 2018

How To Create A Custom Login System In Laravel?

Create a table for users as you want or you can use the same table as well which has all the required fields already there. Create method to add, edit and delete users. it's better to create a separate controller file for that one. Use hash::make() function to encrypt the password value for security. The login function can be written as shown here. public function userlogin(){ $data = Input::all(); $user = $data['username']; ... Read more »

1 Answer       2806 Views

Anonymous

22 Feb, 2018

Session In Laravel Doesn't Get Expired Even After The Browser Is Closed. Is It A Bug?

Go to your session.php file inside the config directory. In the session lifetime section, you can see the session's expire_on_close array with value set as false as shown below. 'expire_on_close' => false, Set it as true as shown below and you're done with it. 'expire_on_close' => true, ... Read more »

1 Answer       3942 Views

Anonymous

02 Feb, 2018

Is There An Easy Way To Upload Excel Data Directly To The Database?

Laravel Excel is quite helpful is resolving that one but we've got easy file handling php functions that can do the work with much convenience. Let's have a look at it. public function importExcel() { $file = $_FILES['uploads']['tmp_name']; $handle = fopen($file, "r"); while($filesop = fgetcsv($handle, 1000, ",")){ $name = $filesop[0]; $gender = $filesop[1]; $address = $filesop[2]; ... Read more »

1 Answer       3230 Views

Jiwan Thapa

18 Jan, 2018

Why Is Page Content Not Showing Up In Wordpress Custom Theme?

Though there might be a lot of problems regarding your case, I'm going with the most basic one since it's a custom wordpress theme. Unlike posts wordpress requires a separate page named page.php to display pages. Check if you have one and make sure that's not empty which should look similar to the one shown below. <?php get_header(); while ( have_posts() ) : the_post(); get_template_part( 'content', 'page' ); endwhile; get_footer(); ... Read more »

1 Answer       2542 Views

Anonymous

23 Dec, 2017

Why Is Comment Section Not Showing Up On Custom Wordpress Page?

This is another issue with wordpress pages while you are a beginner. You create an entire theme that's almost complete but when you test the page contents you can't see the comment fields. You re-examine  all your codings that seems to be okay but still the comment fields won't show up. Basically, if you look up at the database, you can see the posts table has a column named comment_status which has the value set up as closed ... Read more »

2 Answer       2787 Views

Anonymous

02 Nov, 2017

How To Add Bootstrap Dropdown Class In Wordpress Menu Item?

Either you are working on a wordpress theme development or just want to replace the regular wordpress menu style by bootstrap navbar, getting the first level menu is easy but when you have second level menu and you want to display it like you do for bootstrap designs becomes painful for most of the developers. You can find a lot of solutions online on how to add bootstrap navigation on wordpress but when you search for the solutions to add bootstrap dropdown class in wordpress menu, the resul... Read more »

1 Answer       51984 Views

Anonymous

24 Oct, 2017

How To Add Custom Data Table In Wordpress Dashboard?

Sometimes, while working on wordpress themes, you might need to create custom forms and the functions too in order to display the data stored through such forms in wordpress admin dashboard so that they look similar to other tables and have the same features like bulk action, search, pagination, data count as well as actions on hover too. Assuming you know the php basics and can create a form and database tab... Read more »

1 Answer       53641 Views

Anonymous

08 Oct, 2017

How To Stop Form Resubmission On Page Refresh?

Basically, the general idea is to redirect the user to some other pages after the form submission which would stop the form resubmission on page refresh but if you need to hold the user in the same page after the form is submitted, you can do it in multiple ways. Unset Form Data  One way to stop page resubmission on page refresh is to unset the form data after it is submitted so that the variable storing form dat... Read more »

1 Answer       92700 Views

Showing 21 to 30 of 34 results