// in css:
/* Display line under clicked navbar link */
.active {
text-decoration-line: underline !important;
text-decoration-thickness: 2px !important;
color: rgb(20, 19, 19);
}
//in html:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
// Underline to remain in navbar after click using URL
jQuery(function ($) {
var path = window.location.href; // because the 'href' property of the DOM element is the absolute path
$('.nav-link').each(function () {
if (this.href === path) {
$(this).addClass('active');
}
});
});
});
</script>
//Note class in link should be nav-link
//// Validate if Email field is spam
add_action( 'elementor_pro/forms/validation/email', function( $field, $record, $ajax_handler ) {
// Looking if email found in spam array, you can add to the array
$spamemails = array("ericjonesonline@outlook.com", "eric@talkwithwebvisitor.com");
if ( in_array( $field['value'] , $spamemails) ) {
$ajax_handler->add_error( $field['id'], 'אנחנו לא אוהבים ספאם, נסו מייל אחר' );
}
}, 10, 3 );
<?php
// PHP program to find nth
// magic number
// Function to find nth
// magic number
function nthMagicNo($n)
{
$pow = 1;
$answer = 0;
// Go through every bit of n
while ($n)
{
$pow = $pow * 5;
// If last bit of n is set
if ($n & 1)
$answer += $pow;
// proceed to next bit
$n >>= 1; // or $n = $n/2
}
return $answer;
}
// Driver Code
$n = 5;
echo "nth magic number is ",
nthMagicNo($n), "\n";
// This code is contributed by Ajit.
?>
use App\Http\Controllers\OtherController;
class TestController extends Controller
{
public function index()
{
//Calling a method that is from the OtherController
$result = (new OtherController)->method();
}
}
2) Second way
app('App\Http\Controllers\OtherController')->method();
Both way you can get another controller function.
Comments