https://connect.ok.ru/oauth/authorize?client_id={clientId}&scope=GET_EMAIL&response_type={responseType}&redirect_uri={redirectUri}
$(document).ready(function() {
$('#fullpage').fullpage();
});
$(document).ready(function() {
$('#fullpage').fullpage({
//Navigation
menu: '#menu',
lockAnchors: false,
anchors:['firstPage', 'secondPage'],
navigation: false,
navigationPosition: 'right',
navigationTooltips: ['firstSlide', 'secondSlide'],
showActiveTooltip: false,
slidesNavigation: true,
slidesNavPosition: 'bottom',
//Scrolling
css3: true,
scrollingSpeed: 700,
autoScrolling: true,
fitToSection: true,
fitToSectionDelay: 1000,
scrollBar: false,
easing: 'easeInOutCubic',
easingcss3: 'ease',
loopBottom: false,
loopTop: false,
loopHorizontal: true,
continuousVertical: false,
normalScrollElements: '#element1, .element2',
scrollOverflow: false,
touchSensitivity: 15,
normalScrollElementTouchThreshold: 5,
//Accessibility
keyboardScrolling: true,
animateAnchor: true,
recordHistory: true,
//Design
controlArrows: true,
verticalCentered: true,
resize : false,
sectionsColor : ['#ccc', '#fff'],
paddingTop: '3em',
paddingBottom: '10px',
fixedElements: '#header, .footer',
responsiveWidth: 0,
responsiveHeight: 0,
//Custom selectors
sectionSelector: '.section',
slideSelector: '.slide',
//events
onLeave: function(index, nextIndex, direction){},
afterLoad: function(anchorLink, index){},
afterRender: function(){},
afterResize: function(){},
afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex){},
onSlideLeave: function(anchorLink, index, slideIndex, direction, nextSlideIndex){}
});
});
<!DOCTYPE html>
<html>
<head>
<title><?php if(!empty($_GET['name'])): echo 'This is '.$_GET['name'].' story. Click to see your own story.'; else: echo 'Mega Mind Stories'; endif;</title>
<link rel="shortcut icon" href="https://cdn0.iconfinder.com/data/icons/star-wars/512/death_star-128.png" type="image/png">
<meta property="og:image" content="http://mega-mind.info/stories/img/story.jpg" />
<meta property="og:description" content="Your description" />
</head>
<body>
<br><br>
<center>
<p id="story">
<?php
if(!empty($_GET['story'])):
echo $_GET['story']
else:
?>
Some Error!
<?php
endif;
?>
</p>
</center>
</body>
</html>
class Image extends Model
{
public function imageable()
{
return $this->morphTo();
}
}
class Post extends Model
{
public function images()
{
return $this->morphMany('App\Image', 'imageable');
}
}
class Post extends Model
{
public function images()
{
return $this->morphMany('App\Image', 'imageable')->withPivot('imageable_type');
}
}
public function getNameAttribute() {
switch($this->pivot->imageable_type){
case 'App\Post':
// что вы хотите сделать с $this->name если тип - App\Post
break;
}
}
<?php
echo strtoupper(str_replace(array('"', '\u'), array('',' '), json_encode('символ')));
function listen($event, $fire){
Event::listen($event, $fire);
}
event('entity.news.add');
listen('entity.news.add', function(){
//тут код
});
event.preventDefault();
event.stopPropagation();