⚓
Liman Eklenti Geliştirme
  • Hoşgeldiniz!
  • Başlangıç
    • Geliştirme Ortamı Kurulumu
    • Yeni Eklenti Oluşturma
  • Genel Bilgiler
    • Dosya ve Dizin Yapısı
    • Kontrolcüler
    • Rotalar
    • Veritabanı Mantığı
    • Bileşen Mantığı
    • Paket Bağımlılığı Eklemek
    • PHP Yardımcı Fonksiyonları
    • JS Yardımcı Fonksiyonları
  • Geliştirme
    • Sunucuda Komut Çalıştırmak
    • Sunucuda Betik Çalıştırmak
    • Dosya Yükleme, İndirme
    • Protokol Bağlantıları (LDAP, SMB)
  • Arayüz Elemanları
    • Tablo
    • Modal
    • Dosya Yükleme
    • Görev (Task)
  • İleri Seviye
    • Toolkit Kullanımı
    • Yerelleştirme
    • Composer
    • DB Kütüphanesi
Powered by GitBook
On this page
  • Örnekler
  • Distro
  • Command
  • Formatter
  • Validation

Was this helpful?

Export as PDF
  1. İleri Seviye

Toolkit Kullanımı

Toolkit, Liman eklentilerinin geliştirilmesini kolaylaştırmak için çeşitli yardımcılar ve sınıflar sağlayan bir kütüphanedir.

Örnekler

Distro

use Liman\Toolkit\OS\Distro;
Distro::debian('apt install nano -y')
    ->centos('yum install nano -y')
    ->runSudo();
Distro::debian("echo 'debian'")
    ->centos("echo 'centos'")
    ->centos6("echo 'centos6'")
    ->centos7("echo 'centos7'")
    ->pardus19("echo 'pardus19'")
    ->pardus192("echo 'pardus19.2'")
    ->pardus193("echo 'pardus19.3'")
    ->ubuntu("echo 'ubuntu'")
    ->ubuntu1804("echo 'ubuntu18.04'")
    ->ubuntu2004("echo 'ubuntu20.04'")
    ->ubuntu2010("echo 'ubuntu20.10'")
    ->default("echo 'Hiçbiri değil'")
    ->run();

Command

use Liman\Toolkit\Shell\Command;
echo Command::run('hostname');
Command::runSudo('hostnamectl set-hostname @{:hostname}', [
    'hostname' => request('hostname')
]);
use Liman\Toolkit\Shell\SSHEngine;
SSHEngine::init(
    request('ipAddress'),
    request('username'),
    request('password')
);
Command::bindEngine(SSHEngine::class);
echo Command::run('hostname');

Formatter

use Liman\Toolkit\Formatter;
echo Formatter::run('hostnamectl set-hostname @{:hostname}', [
    'hostname' => request('hostname')
]);

//output: hostnamectl set-hostname pardus

Validation

validate([
    'hostname' => 'required|string'
]);
PreviousGörev (Task)NextYerelleştirme

Last updated 3 years ago

Was this helpful?

Dökümantasyon