Skip to content

Instantly share code, notes, and snippets.

View javedLive's full-sized avatar

Md Nazmul Hossain Javed javedLive

View GitHub Profile
@javedLive
javedLive / Show hide div on radio button
Created August 3, 2019 06:23
Show hide div based on radio button
<div class="form-group row">
<label class="col-sm-3 col-form-label">Salary type</label>
<div class="col-sm-4">
<div class="form-radio">
<label class="form-check-label">
<input type="radio" class="form-check-input salaryRadio" name="salary_type" value="0" checked=""> Monthly
<i class="input-helper"></i>
</label>
</div>
</div>
<li class="dropdown nav-border2 {{ Request::segment(1) === 'free-products' ? 'active' : '' }}">
Another option where dynamic url parameter is there.
@foreach($categories as $row)
<li class="dropdown {{ Request::is('categories/'.$row->category_slug) ? 'active' : '' }}">
@endforeach
@javedLive
javedLive / Laravel or PHP : dynamic data populate in bootstrap modal
Created November 20, 2018 05:00
Dynamic data populate in bootstrap modal Laravel or PHP
Route:
Route::get('message/{id}','AuthorController@getMessage');
Controller:
public function getMessage($id)
{
$message = DB::table('messages')->where('id',$id)->first();
return view('ajax-message',['message'=>$message]);
@javedLive
javedLive / Laravel : How to upload image or file on storage Folder
Last active January 25, 2021 17:16
Image Upload Laravel On Storage folder
Upload Controller Code:
public function postDownload(Request $request)
{
$download = new Download();
$download->name = $request->Input(['name']);
if($request->hasFile('display_image'))
{
$file = Input::file('display_image');
@javedLive
javedLive / Convert Number to Words in Bangladeshi currency format Laravel - PHP
Last active August 3, 2019 06:26
Convert Number to Words in Bangladeshi currency format Laravel - PHP
public function getBangladeshCurrency( $number)
{
$decimal = round($number - ($no = floor($number)), 2) * 100;
$hundred = null;
$digits_length = strlen($no);
$i = 0;
$str = array();
$words = array(0 => '', 1 => 'One', 2 => 'Two',
3 => 'Three', 4 => 'Four', 5 => 'Five', 6 => 'Six',
7 => 'Seven', 8 => 'Eight', 9 => 'Nine',
@javedLive
javedLive / SSL COMMERZ Payment Gateway with Laravel (SandBox)
Last active February 18, 2020 07:02
SSL COMMERZ Payment Gateway with Laravel (SandBox)
<form id="payment_gw" action="https://sandbox.sslcommerz.com/gwprocess/v3/process.php" method="post" name="payment_gw">
<input type="hidden" name="store_id" value="test" />
<input type="hidden" name="total_amount" value="{{$total_amount}}" /> // Amount to be paid
<input type="hidden" name="tran_id" value="{{$tran_id }}" /> // A transaction id which will be needed to check valid transaction
<input type="hidden" name="success_url" value="http://laravel-bd.com/shop-success" />
<input type="hidden" name="fail_url" value="http://laravel-bd.com/shop-failure" />
<input type="hidden" name="cancel_url" value="http://laravel-bd.com/shop-cancel" />
</form>
<script type='text/javascript'>
document.payment_gw.submit();
@javedLive
javedLive / Laracasts Free Resources
Created May 2, 2017 07:07
Resources Links of Laracasts
SOLID Principles in PHP >> http://canvas.projekti.info/laracast/SOLID%20Principles%20in%20PHP/
Real-time Laravel with Socket.io >> https://drive.google.com/drive/folders/0B2t-Tmujl-IbdEZ1UDVxOW5PcTQ