php -i | egrep 'limit|timeout|max'
hard_timeout => 2 => 2
log_errors_max_len => 1024 => 1024
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => -1 => -1
post_max_size => 8M => 8M
upload_max_filesize => 2M => 2M
zend.exception_string_param_max_len => 0 => 0
mbstring.regex_retry_limit => 1000000 => 1000000
mbstring.regex_stack_limit => 100000 => 100000
memcached.default_connect_timeout => 0 => 0
memcached.sess_connect_timeout => 0 => 0
memcached.sess_lock_max_wait => not set => not set
memcached.sess_lock_wait_max => 150 => 150
memcached.sess_server_failure_limit => 0 => 0
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
Read timeout => 86400
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000
pgsql.max_links => Unlimited => Unlimited
pgsql.max_persistent => Unlimited => Unlimited
session.cache_limiter => nocache => nocache
session.gc_maxlifetime => 1440 => 1440
default_socket_timeout => 60 => 60
unserialize_max_depth => 4096 => 4096
xdebug.connect_timeout_ms => 200 => 200
xdebug.max_nesting_level => 256 => 256
xdebug.max_stack_frames => -1 => -1
xdebug.remote_timeout => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3
opcache.force_restart_timeout => 180 => 180
opcache.jit_bisect_limit => 0 => 0
opcache.jit_max_exit_counters => 8192 => 8192
opcache.jit_max_loop_unrolls => 8 => 8
opcache.jit_max_polymorphic_calls => 2 => 2
opcache.jit_max_recursive_calls => 2 => 2
opcache.jit_max_recursive_returns => 2 => 2
opcache.jit_max_root_traces => 1024 => 1024
opcache.jit_max_side_traces => 128 => 128
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
AppServiceProvider
public function boot(){
Validator::extend('count_books', function($attribute, $value, $parameters) {
$count = IssueBook::where('client_id', $value)->where('is_returned', false)->count()
return $count < 2;
});
}
StoreRequest
public function rules()
{
return [
'category_id' => 'exists:App\Category,id',
'client_id' => 'exists:App\Client,id|count_books',
'book_id' => 'exists:App\Book,id',
'days_issued' => 'nullable|string',
'is_returned' => 'nullable|boolean',
'return_date' => 'nullable|date',
];
}
return [
['full_name', 'contacts'],
['', 'type', 'name',],
];
$sheet->mergeCells('A1:B1');
select date, abs(sum-first_month_value)/2 from (select
sum(price) as sum,
count(date) as count,
date,
first_value(sum(price)) over() as first_month_value
from t
group by
date
order by date) as t;
WITH RECURSIVE r AS (
SELECT id, parent_id, name, 1 as level, parent_id as first_level
FROM geo
WHERE parent_id = 4
UNION
SELECT geo.id, geo.parent_id, geo.name, (r.level+1), r.first_level
FROM geo
JOIN r
ON geo.parent_id = r.id
)
SELECT * FROM r;
select * from table inner join (select a, b,c from table group by a, b, c having count(*) > 1) as t on t.a = table.a and t.b = table.b and t.c = table.c;
$order = Post::with(['comments' => function ($q){
$q->where('user_id',Auth::id());
}])->whereHas('comments',function ($q){
$q->where('user_id',Auth::id());
})->get();
select
year(date),
sum(`index`.`index`),
substring_index(group_concat(`index`.`index` order by date asc), ',', -1) as last
from
where id_uin = 4 and id_status = 5 group by year(date);
select
(select `index` from `index` where year(date) = '2018' and id_uin = 4 and id_status = 5 order by date desc limit 1 ) as '2018',
(select `index` from `index` where year(date) = '2019' and id_uin = 4 and id_status = 5 order by date desc limit 1 ) as '2019',
(select `index` from `index` where year(date) = '2020' and id_uin = 4 and id_status = 5 order by date desc limit 1 ) as '2020',
(select `index` from `index` where year(date) = '2021' and id_uin = 4 and id_status = 5 order by date desc limit 1 ) as '2021';
select
substring_index(group_concat(`2018`), ',', -1) as `2018`,
substring_index(group_concat(`2019`), ',', -1) as `2019`,
substring_index(group_concat(`2020`), ',', -1) as `2020`,
substring_index(group_concat(`2021`), ',', -1) as `2021`
from (SELECT
CASE WHEN date BETWEEN '2018-01-01' AND '2018-12-31' THEN `index` ELSE null END AS `2018`,
CASE WHEN date BETWEEN '2019-01-01' AND '2019-12-31' THEN `index` ELSE null END AS `2019`,
CASE WHEN date BETWEEN '2020-01-01' AND '2020-12-31' THEN `index` ELSE null END AS `2020`,
CASE WHEN date BETWEEN '2021-01-01' AND '2021-12-31' THEN `index` ELSE null END AS `2021`
FROM `index`
WHERE id_uin = 4 and id_status = 5
GROUP BY `2018`, `2019`, `2020`, `2021`) as t;
echo hash('sha1', "{\"order_id\": \"FACTPRECHR152632\", \"amount\": \"8300.00\"}".'9fff8c602b08b00323567be0001480f6');
$factory->createBrowser(['proxyServer' => '127.0.0.1:8080']);