Skip to content

Instantly share code, notes, and snippets.

View bulentsakarya's full-sized avatar
🎯
Focusing

Bülent Sakarya bulentsakarya

🎯
Focusing
View GitHub Profile
@bulentsakarya
bulentsakarya / PaymentController.php
Created July 26, 2024 15:10
Laravel Paytr Ödeme Entegrasyonu
<?php
namespace App\Http\Controllers\User\Payment;
use App\Http\Controllers\Controller;
use App\Models\Service;
use App\Models\Order;
use App\Services\User\PaymentService;
use Illuminate\Http\Request;
@bulentsakarya
bulentsakarya / gist:21bc5647c2a754fc8c163c9231922c0e
Created July 1, 2024 19:24 — forked from thatguynef/gist:c68452cc2cf31d112b9ba6d76911ae1d
Tutorial - Google Places API Autocomplete Library
// See tutorial video https://youtu.be/qpUfj4zPxWQ
// Google Dev Docs: https://developers.google.com/maps/documentation/javascript/places
// Insert this script in the <head> element
<script async
src="https://maps.googleapis.com/maps/api/js?key=API_KEY&libraries=places&callback=initMap">
</script>
//Insert this script before the closing body tag </body>
<script>
<?php
namespace App\Http\Controllers\Admin\Settings;
use App\Http\Controllers\Controller;
use App\Http\Requests\Admin\Settings\Settings\AppSettingsUpdateRequest;
use App\Models\Setting;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;

This is a simple instruction to use Tabler in your next Laravel project.

(Tabler is a beautiful dashboard: https://tabler.io/)

How to install:

  1. first of all run content of gistfile1.txt in your Laravel project.
  2. Copy tabler.js to recourses/js.
  3. Copy tabler.scss to resources/sass.
  4. Replace webpack.mix.js with your current webpack.mix.js
@bulentsakarya
bulentsakarya / 1 - event
Created March 27, 2024 22:08
Multi Guard with Breeze and Laravel 11
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];
@bulentsakarya
bulentsakarya / functions.php
Created November 23, 2023 11:29
woocommerce remove product tabs
/**
* @snippet Remove Product Tabs & Echo Long Description
* @how-to Get CustomizeWoo.com FREE
* @author Rodolfo Melogli
* @testedwith WooCommerce 5.1
* @donate $9 https://businessbloomer.com/bloomer-armada/
*/
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_after_single_product_summary', 'bbloomer_wc_output_long_description', 10 );
function bbloomer_wc_output_long_description() {
@bulentsakarya
bulentsakarya / EmailVerificationNotificationController
Last active October 11, 2023 18:33
Laravel 10 Breeze Multi Guard
<?php
namespace App\Http\Controllers\Admin\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
@bulentsakarya
bulentsakarya / harici dosya yükleme
Created June 18, 2023 10:24
Javascript Kodları
https://www.educative.io/answers/how-to-dynamically-load-a-js-file-in-javascript
function loadJS(FILE_URL, async = true) {
let scriptEle = document.createElement("script");
scriptEle.setAttribute("src", FILE_URL);
scriptEle.setAttribute("type", "text/javascript");
scriptEle.setAttribute("async", async);
document.body.appendChild(scriptEle);
@bulentsakarya
bulentsakarya / activity
Created June 13, 2023 12:52
activity html css
<div class="vertical-timeline vertical-timeline--animate vertical-timeline--one-column">
<div class="vertical-timeline-item vertical-timeline-element">
<div>
<span class="vertical-timeline-element-icon bounce-in">
<i class="badge badge-dot badge-dot-xl bg-success"> </i>
</span>
<div class="vertical-timeline-element-content border-bottom bounce-in">
<h4 class="timeline-title">Başarılı Ödeme</h4>
<p>Paket ödemesi başarılı bir şekilde gerçekleşti</p>
<span class="vertical-timeline-element-date">12 Ağustos 2022<br>15:30:45</span>
function check_status( WP_User $user ) {
/* 1. WordPress dbsinde kullanıcı var mı, yok mu? */
if(email_exists( $user->user_email )) {
/* 2. Kullanıcı abone mi yönetici mi? */
if ( !in_array( 'subscriber', (array) $user->roles ) ) {
// Devam et
return $user;
} else {