This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |