User Login

Please enter user name and password into following boxes!

If you are not registered yet, please click

Forget Password

If you forget your password, please click

Last Added Tutorials

  • Android Correct Usage Onesignal

    When using onesignal as notification system in Android application, we should insert following codes in ApplicationManifest.xml file: <meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE" /> After adding this meta-data, Android will disable launcher activity to be opened. Handle notification opened event as follows: public class App extends Application { protected boolean active = true; protected int splashTime = 3000; @Override public void onCreate() { s...Continue Reading

    Laravel Seeding in Detail

    Associate User with same role: factory(\App\Models\User::class, 'random', 50)->create()->each(function ($u, $value) { if ($value == null) $value = factory(App\Models\Role::class, 'satici')->make(); else $value = \App\Models\Role::where(['name'=>'satici'])->firstOrFail(); $u->roles()->save($value); });...Continue Reading

    Enable Sql Log in Laravel

    Event::listen('Illuminate\Database\Events\QueryExecuted', function ($query) { if (App::environment() == 'local') { Log::info($query->sql . ' Parameters: ' . serialize($query->bindings)); } });...Continue Reading

    Php Laravel Framework Remove index.php From Url

    Removing index.php from url in Laravel project use following .htaccess commands after RewriteRule ^ index.php [L] RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L] Full htaccess File <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUE...Continue Reading

    Ionic 3 Axios Library Usage

    import * as queryString from 'querystring'; async send(order) { const response = await axios.post('/isbank/send', queryString.stringify( { orderNo: order.orderNo, amount: order.amount, currencyCode: '949', language: 'tr', 'creditCard.cardType': '1', 'creditCard.cv2': order.cvc, 'creditCard.expiredMonth': order.expiredMonth, 'creditCard.expiredYear': order.expiredYear, 'creditCard.pan': order.number, 'user.Email': order.email, 'user.Id': order.userId }...Continue Reading

    .NET Core DbContext Usage

    using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Localization; using VirtualPos.Models; namespace VirtualPos.Controllers { [Route("api/[controller]")] public class BankController : Controller { private readonly BankContext _context; private readonly IStringLocalizer<BankController> _localizer; public BankController(BankContext context, IStringLocalizer<BankController> localizer) { _context = context; _localizer = loca...Continue Reading

    .NET Core Web API Language Support

    [Route("api/[controller]")] public class HomeController : Controller { private readonly IStringLocalizer<HomeController> _localizer; public HomeController(IStringLocalizer<HomeController> localizer) { _localizer = localizer; } [HttpGet("index/{id}")] public IActionResult Index() { return new ObjectResult(_localizer["Hello"]); } } Add Resources folder then, add Controllers.HomeController.tr-TR.resx and Controllers.HomeController.en-EN....Continue Reading

    How to Select Categories in Php Web App?

    Category table: id adi url parent 1 Elektronik elektronik NULL 2 Laptop laptop 1 We can use following codes to extract parent->child category array: /** * Show the application dashboard. * * @return \Illuminate\Http\Response */ public function index() { $categories = DB::table('kategori as k1') ->join('kategori as k2', 'k1.id', '=', 'k2.parent') ->select('k1.adi as parent_adi', 'k1.url as parent_url', 'k2.adi as child_adi', 'k2.url as child_url') ->get(); $parents = array()...Continue Reading

    How to use DB Transaction with Repository Pattern in Laravel?

    In Laravel framework, we can use following transaction block with repository pattern and classic eloquent usage: DB::transaction(function () use ($talep, $input,$id) { UrunTalep::where('talep_id', '=', $talep->id)->forceDelete(); $talep = $this->talepRepository->update($input, $id); });...Continue Reading

    OneSignal Push Notification Send to Specific User in PHP

    $content = array( "en" => $message//mesaj burasi ); $fields = array( 'app_id' => "e3b90484-e534-4a11-9b87-3b9c2fbd413", 'included_segments' => array("Active Users", "Inactive Users"), 'data' => array("foo" => "bar"), 'filters' => array(array('field' => 'tag', 'key' => 'userId', 'relation' => '=', 'value' => $userId)), 'contents' => $content ); $fields = json_encode($fields); print("\nJSON sent:\n"); print($fields); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://onesignal.com/api/v1/notifications"); curl_setopt($ch, CURLOPT_HTTPHEADER, arra...Continue Reading

    PHP OneSignal Push Notification Send to Specific User

    $content = array( "en" => $message//mesaj burasi ); $fields = array( 'app_id' => "e3b90484-e534-4a11-9b87-3b9c2fbd413", 'included_segments' => array("Active Users", "Inactive Users"), 'data' => array("foo" => "bar"), 'filters' => array(array('field' => 'tag', 'key' => 'userId', 'relation' => '=', 'value' => $userId)), 'contents' => $content ); $fields = json_encode($fields); print("\nJSON sent:\n"); print($fields); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://onesignal.com/api/v1/notifications"); curl_setopt($ch, CURLOPT_HTTPHEADER, arra...Continue Reading