Post Categories

Engineering

Single Action Controller Pada Laravel

BY

Luluk Oktaviani

|

Setelah membahas tentang Mudahnya membuat routing dengan Laravel, kali ini saya akan membahas soal Single Action Controller di Laravel, dimana saya yakin ini akan membuat kalian semua ingin melakukan rewrite pada aplikasi yang sudah kalian buat atau kalian kerjakan saat ini. Baiklah, selamat membaca!

Apa itu Single Action Controller

Sederhananya Single Action Controller ini adalah sebuah pattern yang hanya menggunakan satu controller untuk meng-handle logic saat mengakses sebuah route. Kalau dari pernyataan barusan bisa kita simpulkan seperti ini: “setiap route di-handle oleh controller yang berbeda-beda”.

Oke, saya akan berikan contoh sederhana.
web.php

Route::post('/products', 'ProductsController@store');

ProductsController.php

class ProductsController extends Controller {
    public function store(Request $request) {
        // storing product to DB
    }
}
// there are another methods up here

Di atas ini adalah contoh route yang tidak mengimplementasi Single Action Controller, route untuk /products ini di-handle oleh method bernama store() yang terdaftar di ProductsController, dan sedangkan di ProductsController ini ada method-method lain yang meng-handle route lainnya juga. Sehingga tidak jarang kalau di Controller tersebut sudah mencapai 500 baris atau lebih maka akan mempersulit developer ketika melakukan tweak atau maintenance. Tapi akan lain cerita saat kita mengimplementasi Single Action Controller, contoh sederhananya seperti ini:
web.php

Route::post('/products', 'CreateProductController');

CreateProductController.php

class CreateProductController extends Controller {
    public function __invoke(Request $request) {
        // storing product to DB
    }
}

Dari contoh barusan bisa kita lihat kalau controller bernama CreateProductController hanya bertugas untuk meng-handle route /products. Terlihat lebih rapi dan terstruktur bukan?

How to make it?

Tentu saja untuk mengimplementasi Single Action Controller ini sangatlah sederhana, yang jadi poinnya adalah kita harus tahu maksud dari route atau endpoint yang akan kita buat. Oke, saya akan buat satu contoh sederhana lagi. Misalkan saya mau membuat route /auth/register yang memiliki maksud untuk membuat user baru, sehingga dari maksud route itu saya akan membuat controller dengan nama CreateUserController, dan akan saya gunakan seperti ini:

// file web.php
Route::post('auth/register', 'CreateUserController');
//file CreateUserController.php
class CreateUserController extends Controller {
    // use __invoke method
    public function __invoke(Request $request) 
    {
        $valid = $this->validateUserRequest($request->all());
        if (!$valid) {
            // do something when not valid
        }
        // if valid continue create user
        $user = User::create($request->all());
        return response()->json([
            'success' => true,
            'message' => 'user has been created',
            'data' => $user,
        ]);
    }
    // create validator
    public function validateUserRequest($data) 
    {
        // craete the rules
        $rules = [
            'name' => 'required',
            'email' => 'required',
            'password' => 'required'
        ];
        // validate the data based on rules
        $validator = Validator::make($data, $rules);
        // if validator fails return that it is not valid
        if($validator->fails()) {
            return false;
        }
        return true;
    }
}

Kira-kira seperti itu code yang akan saya buat, terstruktur, sehingga suatu saat jika saya perlu melakukan tweak pada route /auth/register saya hanya perlu mengecek file CreateUserController.php, dan developing pun menjadi lebih mudah.

Kesimpulan

Baiklah, mungkin sampai sini saja yang bisa saya bahas soal Single Action Controller, semoga pembahasan kali ini bisa bermanfaat bagi kita semua. Selamat bereksplorasi dengan Single Action Controller dan sampai bertemu di artikel selanjutnya.

Hubungkan dengan kami

Ikuti refactory

Artikel Populer


( ! ) Deprecated: jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead. in /apps/refactory-portal/wp-includes/functions.php on line 5049
Call Stack
#TimeMemoryFunctionLocation
10.0002401224{main}( ).../index.php:0
20.0004401496require( '/apps/refactory-portal/wp-blog-header.php ).../index.php:17
32.137615132712require_once( '/apps/refactory-portal/wp-includes/template-loader.php ).../wp-blog-header.php:19
42.152015217784include( '/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php ).../template-loader.php:106
52.278820503016Elementor\Modules\PageTemplates\Module->print_content( ).../header-footer.php:19
62.278820503392call_user_func:{/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/module.php:207}( $function_name = [0 => class Elementor\Modules\PageTemplates\Module { protected $print_callback = ...; private ${Elementor\Core\Base\Module}reflection = NULL; private ${Elementor\Core\Base\Module}components = [...]; private ${Elementor\Core\Base\Base_Object}settings = NULL }, 1 => 'print_callback'] ).../module.php:207
72.278820503472Elementor\Modules\PageTemplates\Module->print_callback( ).../module.php:207
82.279220504224the_content( $more_link_text = ???, $strip_teaser = ??? ).../module.php:190
92.279420504248apply_filters( $tag = 'the_content', $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../post-template.php:253
102.279420504648WP_Hook->apply_filters( $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<', $args = [0 => '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<'] ).../plugin.php:212
112.280020507648Elementor\Frontend->apply_builder_in_content( $content = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../class-wp-hook.php:287
122.280020508024Elementor\Frontend->get_builder_content( $post_id = 5139, $with_css = ??? ).../frontend.php:898
132.280720777216Elementor\Core\DocumentTypes\Post->print_elements_with_wrapper( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../frontend.php:984
142.287220943512Elementor\Core\DocumentTypes\Post->print_elements( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../document.php:933
152.370622913992Elementor\Element_Section->print_element( ).../document.php:1296
162.374323023848Elementor\Element_Section->print_content( ).../element-base.php:650
172.500125002192Elementor\Element_Column->print_element( ).../element-base.php:907
182.505725103776Elementor\Element_Column->print_content( ).../element-base.php:650
192.593727051048Elementor\Element_Section->print_element( ).../element-base.php:907
202.600227160904Elementor\Element_Section->print_content( ).../element-base.php:650
212.600327162360Elementor\Element_Column->print_element( ).../element-base.php:907
222.605927263944Elementor\Element_Column->print_content( ).../element-base.php:650
232.615627391776OneElements\Includes\Widgets\PostGrid\Widget_OneElements_PostGrid->print_element( ).../element-base.php:907
242.788132271904OneElements\Includes\Widgets\PostGrid\Widget_OneElements_PostGrid->enqueue_scripts( ).../element-base.php:682
252.788132272280Elementor\Utils::handle_deprecation( $item = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper' ).../element-base.php:152
262.788232273144_deprecated_file( $file = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper', $message = ??? ).../utils.php:487
272.788232274216trigger_error( $message = 'jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead.', $error_type = 16384 ).../functions.php:5049

Case Studies


( ! ) Deprecated: jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead. in /apps/refactory-portal/wp-includes/functions.php on line 5049
Call Stack
#TimeMemoryFunctionLocation
10.0002401224{main}( ).../index.php:0
20.0004401496require( '/apps/refactory-portal/wp-blog-header.php ).../index.php:17
32.137615132712require_once( '/apps/refactory-portal/wp-includes/template-loader.php ).../wp-blog-header.php:19
42.152015217784include( '/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php ).../template-loader.php:106
52.278820503016Elementor\Modules\PageTemplates\Module->print_content( ).../header-footer.php:19
62.278820503392call_user_func:{/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/module.php:207}( $function_name = [0 => class Elementor\Modules\PageTemplates\Module { protected $print_callback = ...; private ${Elementor\Core\Base\Module}reflection = NULL; private ${Elementor\Core\Base\Module}components = [...]; private ${Elementor\Core\Base\Base_Object}settings = NULL }, 1 => 'print_callback'] ).../module.php:207
72.278820503472Elementor\Modules\PageTemplates\Module->print_callback( ).../module.php:207
82.279220504224the_content( $more_link_text = ???, $strip_teaser = ??? ).../module.php:190
92.279420504248apply_filters( $tag = 'the_content', $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../post-template.php:253
102.279420504648WP_Hook->apply_filters( $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<', $args = [0 => '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<'] ).../plugin.php:212
112.280020507648Elementor\Frontend->apply_builder_in_content( $content = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../class-wp-hook.php:287
122.280020508024Elementor\Frontend->get_builder_content( $post_id = 5139, $with_css = ??? ).../frontend.php:898
132.280720777216Elementor\Core\DocumentTypes\Post->print_elements_with_wrapper( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../frontend.php:984
142.287220943512Elementor\Core\DocumentTypes\Post->print_elements( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../document.php:933
152.370622913992Elementor\Element_Section->print_element( ).../document.php:1296
162.374323023848Elementor\Element_Section->print_content( ).../element-base.php:650
172.500125002192Elementor\Element_Column->print_element( ).../element-base.php:907
182.505725103776Elementor\Element_Column->print_content( ).../element-base.php:650
192.803132608912Elementor\Element_Section->print_element( ).../element-base.php:907
202.807832718768Elementor\Element_Section->print_content( ).../element-base.php:650
212.807932720224Elementor\Element_Column->print_element( ).../element-base.php:907
222.813432821808Elementor\Element_Column->print_content( ).../element-base.php:650
232.824432950128LivemeshAddons\Widgets\LAE_Posts_Carousel_Widget->print_element( ).../element-base.php:907
242.951034020616LivemeshAddons\Widgets\LAE_Posts_Carousel_Widget->enqueue_scripts( ).../element-base.php:682
252.951034020616Elementor\Utils::handle_deprecation( $item = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper' ).../element-base.php:152
262.951134021480_deprecated_file( $file = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper', $message = ??? ).../utils.php:487
272.951134021800trigger_error( $message = 'jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead.', $error_type = 16384 ).../functions.php:5049
The current query has no posts. Please make sure you have published items matching your query.

( ! ) Deprecated: jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead. in /apps/refactory-portal/wp-includes/functions.php on line 5049
Call Stack
#TimeMemoryFunctionLocation
10.0002401224{main}( ).../index.php:0
20.0004401496require( '/apps/refactory-portal/wp-blog-header.php ).../index.php:17
32.137615132712require_once( '/apps/refactory-portal/wp-includes/template-loader.php ).../wp-blog-header.php:19
42.152015217784include( '/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php ).../template-loader.php:106
52.278820503016Elementor\Modules\PageTemplates\Module->print_content( ).../header-footer.php:19
62.278820503392call_user_func:{/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/module.php:207}( $function_name = [0 => class Elementor\Modules\PageTemplates\Module { protected $print_callback = ...; private ${Elementor\Core\Base\Module}reflection = NULL; private ${Elementor\Core\Base\Module}components = [...]; private ${Elementor\Core\Base\Base_Object}settings = NULL }, 1 => 'print_callback'] ).../module.php:207
72.278820503472Elementor\Modules\PageTemplates\Module->print_callback( ).../module.php:207
82.279220504224the_content( $more_link_text = ???, $strip_teaser = ??? ).../module.php:190
92.279420504248apply_filters( $tag = 'the_content', $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../post-template.php:253
102.279420504648WP_Hook->apply_filters( $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<', $args = [0 => '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<'] ).../plugin.php:212
112.280020507648Elementor\Frontend->apply_builder_in_content( $content = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../class-wp-hook.php:287
122.280020508024Elementor\Frontend->get_builder_content( $post_id = 5139, $with_css = ??? ).../frontend.php:898
132.280720777216Elementor\Core\DocumentTypes\Post->print_elements_with_wrapper( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../frontend.php:984
142.287220943512Elementor\Core\DocumentTypes\Post->print_elements( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../document.php:933
152.370622913992Elementor\Element_Section->print_element( ).../document.php:1296
162.374323023848Elementor\Element_Section->print_content( ).../element-base.php:650
172.500125002192Elementor\Element_Column->print_element( ).../element-base.php:907
182.505725103776Elementor\Element_Column->print_content( ).../element-base.php:650
192.996534387480PremiumAddons\Widgets\Premium_Blog->print_element( ).../element-base.php:907
203.345557865208PremiumAddons\Widgets\Premium_Blog->enqueue_scripts( ).../element-base.php:682
213.345557865208Elementor\Utils::handle_deprecation( $item = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper' ).../element-base.php:152
223.345557866072_deprecated_file( $file = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper', $message = ??? ).../utils.php:487
233.345557866392trigger_error( $message = 'jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead.', $error_type = 16384 ).../functions.php:5049
Tag
Artikel Terkait
Lihat lebih banyak artikel bagus dari kategori ini!

( ! ) Deprecated: jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead. in /apps/refactory-portal/wp-includes/functions.php on line 5049
Call Stack
#TimeMemoryFunctionLocation
10.0002401224{main}( ).../index.php:0
20.0004401496require( '/apps/refactory-portal/wp-blog-header.php ).../index.php:17
32.137615132712require_once( '/apps/refactory-portal/wp-includes/template-loader.php ).../wp-blog-header.php:19
42.152015217784include( '/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php ).../template-loader.php:106
52.278820503016Elementor\Modules\PageTemplates\Module->print_content( ).../header-footer.php:19
62.278820503392call_user_func:{/apps/refactory-portal/wp-content/plugins/elementor/modules/page-templates/module.php:207}( $function_name = [0 => class Elementor\Modules\PageTemplates\Module { protected $print_callback = ...; private ${Elementor\Core\Base\Module}reflection = NULL; private ${Elementor\Core\Base\Module}components = [...]; private ${Elementor\Core\Base\Base_Object}settings = NULL }, 1 => 'print_callback'] ).../module.php:207
72.278820503472Elementor\Modules\PageTemplates\Module->print_callback( ).../module.php:207
82.279220504224the_content( $more_link_text = ???, $strip_teaser = ??? ).../module.php:190
92.279420504248apply_filters( $tag = 'the_content', $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../post-template.php:253
102.279420504648WP_Hook->apply_filters( $value = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<', $args = [0 => '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<'] ).../plugin.php:212
112.280020507648Elementor\Frontend->apply_builder_in_content( $content = '<h2>Post Categories</h2>\t\t\n\t\t\t<ul id="main-menu"><lidata-vertical-menu=750px><a href="https://refactory.id/blog/">Blog</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-engineering/">Engineering</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-profile/">Profile</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tutorial/">Tutorial</a></li>\n<lidata-vertical-menu=750px><a href="https://refactory.id/blog-tips-trick/">Tips &#038; Trick<' ).../class-wp-hook.php:287
122.280020508024Elementor\Frontend->get_builder_content( $post_id = 5139, $with_css = ??? ).../frontend.php:898
132.280720777216Elementor\Core\DocumentTypes\Post->print_elements_with_wrapper( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../frontend.php:984
142.287220943512Elementor\Core\DocumentTypes\Post->print_elements( $elements_data = [0 => ['id' => '2fc86182', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 1 => ['id' => '7d547053', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 2 => ['id' => '663c5766', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 3 => ['id' => '53530387', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE], 4 => ['id' => '9176ced', 'elType' => 'section', 'settings' => [...], 'elements' => [...], 'isInner' => FALSE]] ).../document.php:933
153.385053065120Elementor\Element_Section->print_element( ).../document.php:1296
163.388953174976Elementor\Element_Section->print_content( ).../element-base.php:650
173.389053176432Elementor\Element_Column->print_element( ).../element-base.php:907
183.392453278016Elementor\Element_Column->print_content( ).../element-base.php:650
193.419953942064OneElements\Includes\Widgets\PostGrid\Widget_OneElements_PostGrid->print_element( ).../element-base.php:907
203.469454724240OneElements\Includes\Widgets\PostGrid\Widget_OneElements_PostGrid->enqueue_scripts( ).../element-base.php:682
213.469454724616Elementor\Utils::handle_deprecation( $item = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper' ).../element-base.php:152
223.469454725480_deprecated_file( $file = 'jquery-slick', $version = '2.7.0', $replacement = 'Swiper', $message = ??? ).../utils.php:487
233.469454725800trigger_error( $message = 'jquery-slick is <strong>deprecated</strong> since version 2.7.0! Use Swiper instead.', $error_type = 16384 ).../functions.php:5049
×