Laravel命令像修补匠

时间:2017-11-28 09:05:36

标签: laravel artisan tinker

我想知道是否有办法在laravel中运行ad-hoc命令?喜欢修补,但没有修补?

我希望能够运行ad-hoc命令,但不使用修补程序?

示例:

scala> spark.range(4).createOrReplaceTempView("nums")

scala> spark.sql("SHOW TABLES").show
+--------+---------+-----------+
|database|tableName|isTemporary|
+--------+---------+-----------+
|        |     nums|       true|
+--------+---------+-----------+


scala> spark.sql("SELECT * FROM nums").explain
== Physical Plan ==
*Range (0, 4, step=1, splits=8)

scala> spark.sql("SELECT * FROM nums").explain(true)
== Parsed Logical Plan ==
'Project [*]
+- 'UnresolvedRelation `nums`

== Analyzed Logical Plan ==
id: bigint
Project [id#40L]
+- SubqueryAlias nums
   +- Range (0, 4, step=1, splits=Some(8))

== Optimized Logical Plan ==
Range (0, 4, step=1, splits=Some(8))

== Physical Plan ==
*Range (0, 4, step=1, splits=8)

我想每隔5秒运行一次?

1 个答案:

答案 0 :(得分:0)

是的,你可以在工匠中编写orn命令。这非常有用。

课程保存在app/console

更多:https://laravel.com/docs/5.5/artisan