data: {
todoTitle: '',
todoDesc: '',
todos: [
{isOpen:false, title: "Do something", description: "To do something", completed: false, id: 0},
{isOpen:false, title: "Do something 2", description: "To do something 2", completed: false, id: 1},
{isOpen:false, title: "Do something 3", description: "To do something 3", completed: false, id: 2},
]
},
public function index(){
$history = History::where('id','>',0)->orderBy('id','desc')->limit(3)->get();
$lives = Tournaments::where('live',1)->where('status',1)->get();
$coming = Tournaments::where('live',0)->where('status',0)
->where('team1','!=','no team1')
->where('team2','!=','no team2')
->where('date','>=',Carbon::now()->timestamp)
->orderBy('date','ASC')
->take(10)
->get();
$latest = Tournaments::where('live',0)->where('status',0)->where('date','>=',Carbon::now()->timestamp)->orderBy('date','ASC')->first();
if($latest){
$last = Carbon::createFromTimestamp($latest->date)->toDateTimeString();
if(count($lives) == 0){
$c = 0;
}else{
$c = 1;
}
if(count($coming) == 0){
$pages = 1;
}else{
$pages = round(count($coming)/10);
}
}
запуститьАнимацию();
axios
.get('/api/capitalization/' + currency)
.then(response => {
// Пишем parse, потому что из базы берется сразу JSON с слешами "\"
this.info = JSON.parse(response.data);
console.log(this.info);
})
.catch(err => {console.log(err)})
.finally(resp => {
остановитьАнимацию();
});
let icons = {
"math": "icon_name",
"physic": "icon_name_2"
}
let subject = 'math';
console.log(icons[subject])