PHP code example of haythembenkhlifa / marks-slider
1. Go to this page and download the library: Download haythembenkhlifa/marks-slider library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
haythembenkhlifa / marks-slider example snippets
// NOVA RESOURCE
use Haythembenkhlifa\MarksSlider\MarksSlider;
public function fields(Request $request)
{
return [
MarksSlider::make("Marks Slider", "custom_field")
->setValues(['Not Likely' => 0, 'Maybe' => 2, 'Very likely' => 4])
->setStep(2)
->initialValue(4) //this will set the default value if there is nothing on the database.
->showLabels(true),
];
}